Navigating multiple widgets with arrow keys

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • Navigating multiple widgets with arrow keys

    Hi Adrian,

    I would like to ask a new question that extends for the previous question I asked earlier "Widget keyboard reaction"

    I am designing a GUI that uses the four arrow keys as well as an enter key. I need the arrow keys to navigate between various widgets on a window, usually the arrow and enter keys will be used to select one of the widgets (get the focus of the widget). Once the widget has the input focus, the arrow keys must control the widget using the default keyboard reaction.

    I got most of this working by sending my own key values for these 5 keys, from the keyboard driver, then in the callback with WM_KEY I have a few checks to decide how to hangle the keybaord input. If I want the widget to react using the default system responses I then use the function GUI_StoreKeyMsg(GUI_KEY_UP, 1), to get the widget to react using its system default. I dont want to use a TAB key to do this as I am very linited with the amount of keys I can use, also I want to be able to navigate up, down left and right, which the TAB key doesn't really offer.

    The problem with this is that it is becoming a little complex for a few reasons.

    Is there not an easier way of doing this?

    I hope I have explained the scenario clearly.