Jump to content

Navigation by TAB from Text-Entry Box


Recommended Posts

On my Front Panel I have mostly buttons. Buttons and a single Input box for typing serial number. That single Input box feels like a stumbling block to users who habitually TAB their way from widget to widget. They stumble because, after typing the serial number into the box, they can't TAB their way out. Instead (of course, to my way of thinking) the Input box accepts the TAB as a character (rather than interpret it as a command). It bothers some (unreasonably, to my way of thinking) that they should have to press Enter, rather than TAB, to exit that box. What they want is to press TAB and have the data be entered, plus take them to the next widget (a Button).

So my question here is, can I make that happen for them? Can I make TAB perform like Enter while inside an Input box? Or should I just insist they get used to Input boxes requiring Enter?

Edited by Gan Uesli Starling
Link to comment

You can handle a Key Down? filter event for that input box, and check if the key was Tab. A filter event allows you to change parameters of the event before it's handled, so you can change the Tab to Enter, then allow the event to process normally. Or, slightly more complicated, you can discard the event if Tab is pressed, and change the focus to the next item (if you want to be extra clever, also handle the shift-tab case for going to the previous item).

  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.