Beispiel #1
0
def remove_hotkeys():
    global INSTALLED_HOTKEYS

    for i in INSTALLED_HOTKEYS:
        ida_kernwin.del_hotkey(i)
    del INSTALLED_HOTKEYS
    return
 def run(self, arg):
     for keystroke, method in self.hotkeys:
         ida_kernwin.del_hotkey(keystroke)
         ida_kernwin.add_hotkey(keystroke, method)
Beispiel #3
0
  callback.

keywords: actions

see_also: actions
"""

from __future__ import print_function

import ida_kernwin


def hotkey_pressed():
    print("hotkey pressed!")


try:
    hotkey_ctx
    if ida_kernwin.del_hotkey(hotkey_ctx):
        print("Hotkey unregistered!")
        del hotkey_ctx
    else:
        print("Failed to delete hotkey!")
except:
    hotkey_ctx = ida_kernwin.add_hotkey("Shift-A", hotkey_pressed)
    if hotkey_ctx is None:
        print("Failed to register hotkey!")
        del hotkey_ctx
    else:
        print("Hotkey registered!")
 def term(self):
     for keystroke, method in self.hotkeys:
         ida_kernwin.del_hotkey(keystroke)