On Fri, 17 Nov 2023 20:05:09 GMT, Martin Fox <m...@openjdk.org> wrote:

> 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.

This pull request has now been integrated.

Changeset: ee8633cb
Author:    Martin Fox <m...@openjdk.org>
URL:       
https://git.openjdk.org/jfx/commit/ee8633cb6d19b6da7bf32ad3cdee31261a7cf458
Stats:     81 lines in 19 files changed: 48 ins; 0 del; 33 mod

8089373: Translation from character to key code is not sufficient

Reviewed-by: angorya, mstrauss

-------------

PR: https://git.openjdk.org/jfx/pull/1289

Reply via email to