Standard keyboard control for option/popup menu buttons

Something you want to see in a LiveCode product? Want a new forum set up for a specific topic? Talk about it here.

Moderator: Klaus

Post Reply
MichaelBluejay
Posts: 230
Joined: Thu Jul 01, 2010 11:50 am

Standard keyboard control for option/popup menu buttons

Post by MichaelBluejay » Wed Sep 08, 2010 6:54 pm

I'd like the ability to tab to an option/pulldown/popup menu, like I can do in other apps. When I fill out a form on my Mac (like in Safari), I can tab to a <select> menu. The menu gets a nice thick border to indicate that I've tabbed to it. I can then press any alphanumeric key to drop the menu and scroll to the first item that begins with the key I pressed.

Rev doesn't seem to have the ability to tab to an option/pulldown/popup menu, but this would be a great feature, to allow a consistent user interface just like it works in other apps.

Thank you very much for considering this.

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: Standard keyboard control for option/popup menu buttons

Post by mwieder » Wed Sep 08, 2010 11:28 pm

set the traversalon of the option/popup menu button to true and you'll get the effect you're looking for.

MichaelBluejay
Posts: 230
Joined: Thu Jul 01, 2010 11:50 am

Re: Standard keyboard control for option/popup menu buttons

Post by MichaelBluejay » Tue Oct 19, 2010 9:10 pm

No, it doesn't. I create a new stack, create a field and a button, set the button's traversalon to true, click in the field to get a cursor, hit the tab key, and nothing happens. The cursor is still in the field, and the button isn't hilited.

I checked the docs, and you're not even supposed to be able to tab to a popup menu unless the LookAndFeel is set to Windows95 or Motif, and it's not supposed to receive keystrokes unless the LookAndFeel is Motif. So putting that together, only with Motif can I get the behavior I want.

This feature should be trivial to implement, just having one or two more properties to set. (e.g. "focusOnTab" and "dropOnReturn") Do the developers ever post here to let us know whether feature requests are accepted or discarded?

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: Standard keyboard control for option/popup menu buttons

Post by mwieder » Wed Oct 20, 2010 1:14 am

You know, the more information you put in here the easier it is to see what you're talking about.

On OSX you're not supposed to be able to do that. It's an OS thing, IIRC, not an app thing. The fact that Safari does this doesn't change that. Apple violates its own HIG whenever it chooses. To get your desired result, put this script into the field:

Code: Select all

on tabkey
  click at the loc of button whatever
end tabkey
Other than violating the HIG, I think your suggestion of the extra properties to allow the tab key to function this way cross-platform is a valid one.
Do the developers ever post here to let us know whether feature requests are accepted or discarded?
Not as far as I know.

MichaelBluejay
Posts: 230
Joined: Thu Jul 01, 2010 11:50 am

Re: Standard keyboard control for option/popup menu buttons

Post by MichaelBluejay » Sat Nov 27, 2010 12:08 am

To get your desired result, put this script into the field:
No, that doesn't work. As I said in my first post, when I tab to an option menu in Safari, (1) it gets a nice thick border to indicate that I've tabbed to it, and (2) I can then press any alphanumeric key to drop the menu and scroll to the first item that begins with the key I pressed. Your code simply drops the menu.

I can painstakingly draw a border around the button manually through a script (which brings up the other post I made that there's a bug that prevents me from doing this easily), but then it's a pain to figure out when I need to remove the manual highlighting from the button. And even if I do all this, I can't drop the menu with an alphanumeric keypress and have the selection scroll to the first menu item that begins with that key, at least not so far as I know.

I would love LiveCode to work like it does in Safari. Safari makes it easy for the user. In LiveCode the user experience is more cumbersome.

Post Reply