Re: global keybindings

Paul Barton-Davis <pbd op net> writes:
> what's the latest word on how to do global key bindings ?
> i have an app in which i want focus to direct keystrokes to a specific
> handler more or less all the time. that is, i don't care what widget
> the pointer is in, 95% of the time, i just want my handler to take
> care of it. this seems hard, especially when button presses and the
> like grab keyboard focus away from the former widget (though I suppose
> i could turn it off).

I believe the only real way to do this is to connect to
key_press_event on the toplevel window.

If you could add a callback to an AccelGroup as we should but don't
yet have in 2.0, you could just add an accel group to the toplevel and
install an accelerator.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]