Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: keyboard shortcut problems



Why are you using the Option key as an accelerator at all? This key has a rather specific purpose on the Mac, and by using it for accelerators you're rather overriding the behavior a Mac user would expect. On many international keyboards, the Option key is the only means of entering parens, braces, brackets, and even a slash (all of which are rather important symbols when writing code). Mac users will expect the Command key as an accelerator, used in conjunction with Shift and Option (and more limited, Control).


Mike


Tim Boudreau wrote:

Okay, I've done a much uglier fix for this: Don't replicate Apple's hack in DefaultKeyAction, but instead test the key char for being a bracket or parenthesis. The good news: bound keys won't insert bogus characters, and brackets will work. The bad news: Any actions bound to Alt+ a key which produces a bracket are now broken, and you won't be able to use Alt to compose anything but brackets. Butt ugly, but at least it solves the common case.

Perhaps for a future release it would be possible to provide alternate bindings so Alt is simply never used for binding actions; however doing that presents a couple of problems: 1. The alternate keybindings would need to be documented (as in, docs writers will strenuously object), and 2. There simply may not be enough keys to go around, sans one modifier key - at least not while producing vaguely intuitive shortcuts.

If anybody knows of a way (even a hack) to track and check the currently set keyboard layout, I could probably at least make the behavior togglable between alt-as-compose and alt-as-accelerator.

Production code is never pretty...

-Tim

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden
References: 
 >Netbeans 4.0 beta and french keyboard (From: Henry Story <email@hidden>)
 >Re: Netbeans 4.0 beta and french keyboard (From: Bjørn Ole Bakke <email@hidden>)
 >Re: Netbeans 4.0 beta and french keyboard (From: Henry Story <email@hidden>)
 >Re: Netbeans 4.0 beta and french keyboard (From: Tim Boudreau <email@hidden>)
 >Re: Netbeans 4.0 beta and french keyboard (From: Henry Story <email@hidden>)
 >keyboard shortcut problems (From: Henry Story <email@hidden>)
 >Re: keyboard shortcut problems (From: Tim Boudreau <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.