Setting focus change/activation bindings



Background:

I'm trying to build a GTK+ GUI for a simple embedded system with limited input. Specifically it's an ipod-style wheel with click, so I have three buttons: forward, backward, and select. I'd like to be able to use forward and backward to move focus, the way tab/shift-tab does currently, and then the select button to work like spacebar.

I can do this by mapping the buttons to tab, shift-tab, and spacebar, but some widgets need more keys, e.g. you need up and down arrows for a menu, but the right and left arrows to move into/out of sub-menus.

Question:

How can I insert my own key bindings for GUI events that are normally mouse-driven? Do I need to do this by manually moving focus between items and trapping keypresses?

Any ideas would be greatly appreciated.




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