pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ocean ocean <riveroce...@gmail.com>
Subject Re: Menu Accelerators
Date Fri, 05 Nov 2010 23:43:15 GMT
I may also have missed this in the tutorial but is it possible to set
keyboard shortcuts to jump around different controls in a Form? I'm looking
at the javadoc and nothing jumps out at me.

Thanks,

On Fri, Nov 5, 2010 at 7:19 PM, ocean ocean <riverocean1@gmail.com> wrote:

> That's pretty cool. I do think it would be useful as my users are pretty
> big on keyboard navigability. Where did you put that code, in some sort of
> key listener on the frame itself?
>
>
> On Fri, Nov 5, 2010 at 7:00 PM, Greg Brown <gkbrown@mac.com> wrote:
>
>> Here's an example of how you might activate the menu in a key press
>> handler. When the user presses Alt-Space and the menu is not currently
>> active, the first menu is shown and the user can navigate the menu via
>> keyboard:
>>
>>         Frame frame = (Frame)component;
>>         MenuBar menuBar = frame.getMenuBar();
>>
>>         if (menuBar != null
>>             && keyCode == Keyboard.KeyCode.SPACE
>>             && Keyboard.isPressed(Keyboard.Modifier.ALT)) {
>>             MenuBar.Item activeItem = menuBar.getActiveItem();
>>             MenuBar.ItemSequence items = menuBar.getItems();
>>
>>             if (activeItem == null
>>                 && items.getLength() > 0) {
>>                 items.get(0).setActive(true);
>>             }
>>         }
>>
>> I actually implemented this in TerraFrameSkin#keyPressed() - if you think
>> it is useful, I can commit it.
>>
>> G
>>
>> On Nov 5, 2010, at 4:17 PM, Greg Brown wrote:
>>
>> What you are describing is called a mnemonic:
>>
>>   http://msdn.microsoft.com/en-us/library/bb158536.aspx
>>
>> There are no current plans to implement such a feature. However, it should
>> be easy enough to wire up a key event listener that will open the menu bar -
>> the user could use the arrow or tab keys to navigate the menu system from
>> there.
>>
>> On Nov 5, 2010, at 4:10 PM, ocean ocean wrote:
>>
>> Not sure what you mean. I can create global keyboard shortcuts as
>> described in the MenuBars tutorial. I mean ability to press 'Alt' and have
>> that underline top-level menus, then press 'F' to pop open the File menu. So
>> users can navigate the menu structure without reaching for the mouse. Just
>> curious if this is something planned or not.
>>
>> On Fri, Nov 5, 2010 at 4:06 PM, Greg Brown <gkbrown@mac.com> wrote:
>>
>>> Windows-style mnemonics are not supported, but Mac-style keyboard
>>> shortcuts are. See the Menu Bars tutorial for more info.
>>>
>>> On Nov 5, 2010, at 3:50 PM, ocean ocean wrote:
>>>
>>> I understand according to (
>>> http://mail-archives.apache.org/mod_mbox/pivot-user/201010.mbox/%3C736AE2F1-374F-4E5E-BCF8-B7A9B381C5C7@mac.com%3E
)
>>> menu accelerators aren't built in yet. Keyboard navigability is pretty
>>> important for my apps so I was just curious if this was in the plans...
>>>
>>>
>>>
>>
>>
>>
>

Mime
View raw message