This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Menu mnemonics from lowercase letters do not work | ||
---|---|---|---|
Product: | platform | Reporter: | Jesse Glick <jglick> |
Component: | Window System | Assignee: | _ mihmax <mihmax> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | Keywords: | A11Y |
Priority: | P2 | ||
Version: | 3.x | ||
Hardware: | PC | ||
OS: | Linux | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 26640 |
Description
Jesse Glick
2003-02-12 17:15:30 UTC
I suppose you are right - calling setMnemonic(int) is bad, I'll use setMnemonic(char) instead. Or, maybe, I should cut&paste a-z -> A-Z translation from setMnemonic(char) and call "not-obsolete" setMnemonic(int)? I'm also curious, what characters may be used as mnemonic other than [a-z,A-Z,0-9], maybe -,=,\,`,[,],;,',,,.,/ on some of them ([];',./` there're Russian letters). Re. calling setMnemonic(char) vs. copying logic to translate [a-z] - I guess it doesn't make much difference. Re. other mnemonicable characters - don't know. I have only ever heard of alphanumerics as mnemonics. Since that is all the JRE supports, probably that is all we need to support too (besides your work - the special support for e.g. Alt-F posting an underlined Cyrillic phi). Well, my final decision is not to copy [a-z] -> [A-Z] logic inside Mnemonics.java, but still I'd like to make some extensions to Mnemonics.java (no limit to improve ;-)): KeyEvent.VK_AMPERSAND!=(int)'&' !!!, hence I'll need to setup a table in Mnemonics.properties to convert '&' to KeyEvent.VK_AMPERSAND, and not just (int) it, i.e. MNEMONIC_&=150 I'll make a thorough test before commiting. OK. Does anyone actually use '&' as a mnemonic? (Alt-Shift-7 on a US keyboard?) Just curious. OK, wrong example ;-) VK_BACK_QUOTE != (int)'`' i.e.: MNEMONIC_`=192 Actually, I don't think that anybody will use ` as a mnemonics in English, but who knows... But there's a Russian character 'jo' (rarely used) on it, so MNEMONIC_\u0401=` would be wrong, the correct is MNEMONIC_\u0401=192 One more example: # public static final int VK_QUOTE 222 MNEMONIC_\'=222 done Checking in openide/src/org/openide/awt/Mnemonics.properties; new revision: 1.2; previous revision: 1.1 Checking in openide/src/org/openide/awt/Mnemonics.java; new revision: 1.2; previous revision: 1.1 Jesse, please verify, especially in English locale ;-) Alt-R works now. Also I confirmed that ' and ` can work as mnemonics, for whatever that's worth. More rewrite (now using setMnemonic(int) istead of setMnemonic(char)). Also under JDK1.3 when someone wants to set, e.g. `, as mnemonic a character that has a keycode different from a char itself, there's a conflict: appending (<Keycode>) shows some character, which is, hmm, a strange one ;-) (there's no such char on the keyboard), because <Keycode> is not a character at all. So, some mess is appended, but Alt+` will work. Under JDK1.4 everything is OK, but this is a A11Y issue on 1.3, so setting ` as mnemonic is HIGHLY not recommended, though possible. Checking in openide/src/org/openide/awt/Mnemonics.java; new revision: 1.3; previous revision: 1.2 done, I hope ;-) |