[Idle-dev] Help - Debugger key bindings
David McNab
david@rebirthing.co.nz
01 Apr 2003 01:12:52 +1200
Hi,
I'm trying to hack the IDLE debugger so that the Step, Over, Out etc
buttons can be triggered with keystrokes (to ease my aching mouse
finger).
There's really nothing worse than the pain of having to click the mouse
repeatedly for every step while debugging - keystrokes are far easier.
I've been partly successful - in Debugger.py, make_gui(), I've added:
self.top.bind("<Alt-9>", self.step)
and to avoid an arguments mismatch, I've changed step:
def step(self, arg=None)
There's only one problem - when I press Alt-9, the step happens fine.
However, window focus changes to the source window, which means I have
to either click the debug pane again with the mouse, or press Alt-Tab to
switch focus.
Can someone please advise if there's any way to switch focus back to the
debug frame from within Debugger.step() ?
All help appreciated.
Cheers
David