RFR: 8089373: Translation from character to key code is not sufficient [v2]
Martin Fox
mfox at openjdk.org
Fri Feb 9 03:37:17 UTC 2024
> On Windows a common shortcut like Ctrl+'+' could only be invoked from the main keyboard and not the numeric keypad. Toolkit.getKeyCodeForChar did not have enough context to know whether it should return a result from the main keyboard or the keypad.
>
> This PR alters getKeyCodeForChar to pass in the code of the key the system is trying to match against. Only the Windows platform actually uses this additional information.
>
> On the Mac the numeric keypad has always worked due to the odd way getKeyCodeForChar is implemented (until PR #1209 the keypad worked more reliably than the main keyboard). On Linux getKeyCodeForChar is a mess; neither the main keyboard or the numeric keypad work reliably. I have an upcoming PR which should make both work correctly.
Martin Fox has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains seven additional commits since the last revision:
- Consistent terminology and more details in comments.
- Merge remote-tracking branch 'upstream/master' into keypadcombo
- Added SEPARATOR to list of keypad keys
- CharacterCombinations now work on the numeric keypad
- Fixed Monocle
- Merge remote-tracking branch 'upstream/master' into keypadcombo
- Added hint to getKeyCodeForChar to enable numeric keypad
-------------
Changes:
- all: https://git.openjdk.org/jfx/pull/1289/files
- new: https://git.openjdk.org/jfx/pull/1289/files/7a297aee..6400299e
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jfx&pr=1289&range=01
- incr: https://webrevs.openjdk.org/?repo=jfx&pr=1289&range=00-01
Stats: 347637 lines in 7144 files changed: 198051 ins; 105131 del; 44455 mod
Patch: https://git.openjdk.org/jfx/pull/1289.diff
Fetch: git fetch https://git.openjdk.org/jfx.git pull/1289/head:pull/1289
PR: https://git.openjdk.org/jfx/pull/1289
More information about the openjfx-dev
mailing list