mirror of
https://github.com/idapython/src
synced 2026-06-08 14:47:00 +00:00
19 lines
551 B
Python
19 lines
551 B
Python
"""
|
|
This example shows how to use ida_kernwin.UI_Hooks, to respond to a
|
|
command instead of the action that would otherwise do it.
|
|
"""
|
|
|
|
import ida_kernwin
|
|
|
|
class prevent_jump_t(ida_kernwin.UI_Hooks):
|
|
def preprocess_action(self, action_name):
|
|
if action_name == "JumpEnter":
|
|
print("Inhibiting 'jump'!")
|
|
return 1
|
|
return 0
|
|
|
|
phh = prevent_jump_t()
|
|
if phh.hook():
|
|
print("From now on, pressing <Enter> will prevent IDA from jumping. "\
|
|
+"Please type 'phh.unhook()' to revert to the normal behavior.")
|