swpalmer at gmail.com
Wed Jan 9 13:01:20 PST 2013
[back on list]
I didn't get any feedback from my message to the list. (Your message was the first.)
I had not yet filed an issue, but thanks for reminding me.
I have just created http://javafx-jira.kenai.com/browse/RT-27592
It looks like I should use KeyCharacterCombination("+", KeyCombination.CTRL_DOWN) instead. I just tried it and it doesn't work at all.
On 2013-01-09, at 5:58 AM, Anthony Petrov <anthony.petrov at oracle.com> wrote:
> Hi Scott,
> Have you filed/found one already? Please provide me (and/or the mailing list) with the issue ID, since I'm interested in this sort of stuff too. Thanks.
> best regards,
> On 1/5/2013 0:29, Scott Palmer wrote:
>> On a JMenuItem I can set an accelerator to be KeyEvent.VK_PLUS with a KeyEvent.CTRL_DOWN_MASK modifier.
>> When I press CTRL+SHIFT+EQUALS, since the plus sign on a standard US keyboard is obtained by holding SHIFT while pressing the equals key. It works.
>> If in JavaFX I use an accelerator of new KeyCodeCombination(KeyCode.PLUS, KeyCombination.CTRL_DOWN), then pressing CTRL+SHIFT+EQUALS does not activate the accelerator. Nor does pressing CTRL+The_Numeric_Keypad_PLUS. Note that there is no KeyCode specifically for the numeric keypad plus sign as far as I can tell.
>> If I code the accelerator as CTRL+SHIFT+EQUALS it doesn't convey the same meaning (I'm using this to zoom in) and I worry that it won't make sense on non-US keyboards because the plus sign may be somewhere else.
>> Interestingly I see KeyCode.KP_UP, KeyCode.KP_DOWN, KeyCode.KP_LEFT, KeyCode.KP_RIGHT in addition to just KeyCode.UP, KeyCode.DOWN, KeyCode.LEFT, KeyCode.RIGHT. The KP_ versions refer to "key pad" arrow keys (for when some weirdo turns off numlock). So the omission of the / * - + keys that surround the numeric keypad on a standard US keyboard seems to be an oversight.
>> Is there an issue for this already?
More information about the openjfx-dev