Optional callback function. If present, OllyDbg calls it each time when user presses combination of keys that is not recognized by standard OllyDbg window. This function is usually called twice: first time with origin=PM_MAIN indicating global shortcut, and second time with origin identifier of window that has keyboard focus. Shortcuts are scarce resource and I will constantly add new to OllyDbg, so use this feature with care and always implement alternative possibilities.
int ODBG_Pluginshortcut(int origin,int ctrl,int alt,int shift,int key,void *item);
Parameters:
origin - code of window that calls ODBG_Pluginshortcut. OllyDbg supports following codes:
Code | Cast item to | Who calls ODBG_Pluginmenu |
PM_MAIN | item is always NULL | Main window |
PM_DUMP | (t_dump *) | Any Dump window |
PM_MODULES | (t_module *) | Modules window |
PM_MEMORY | (t_memory *) | Memory window |
PM_THREADS | (t_thread *) | Threads window |
PM_BREAKPOINTS | (t_bpoint *) | Breakpoints window |
PM_REFERENCES | (t_ref *) | References window |
PM_RTRACE | (int *) | Run trace window |
PM_WATCHES | (1-based index) | Watches window |
PM_WINDOWS | (t_window *) | Windows window |
PM_DISASM | (t_dump *) | CPU Disassembler |
PM_CPUDUMP | (t_dump *) | CPU Dump |
PM_CPUSTACK | (t_dump *) | CPU Stack |
PM_CPUREGS | (t_reg *) | CPU Registers |
ctrl - state of Ctrl key: 0 - released, 1 - pressed;
alt - state of Alt key: 0 - released, 1 - pressed;
shift - state of Shift key: 0 - released, 1 - pressed;
key - code of pressed virtual key (VK_xxx). See "Virtual Key Codes" in Windows API help for a complete list of virtual key codes;
item - pointer either to selected element of sorted data displayed in window or, in case of dump windows, pointer to dump descriptor, or NULL. You may need this element to carry out requested action.