Need advice on key_press_event.




Hi

We have made a canvaswidget (not the Gnome canvaswidget) that can be
scrolled up and down. What I know want to do is to add keybindings for
Pg_Down and Pg_Up (and some other keys as well). 

I can do this with an eventbox attached to the canvaswidget, but that
requires that the widget has focus. I would very much like to be able
to press Pg_Down no matter which widget has focus (perhaps except
entry/combobox widgets though) and get the canvas to scroll.

How would you go about to do this? Is there a mechanisme for doing
this. As the menu has shortcuts that work without the menubar having
focus, I thought there might be one.

Any hints much appreciated.

-- 
Preben Randhol             oO     "Don't think about domination,  think
[randhol@pvv.org]        .`  ;     about freedom, it doesn't dominate."
[www.pvv.org/~randhol/]   \ G                  -- RMS, LinuxWorld 1999.
                           `_) n o m e 



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