On Fri, 25 Aug 2023 22:18:42 GMT, Harshitha Onkar <hon...@openjdk.org> wrote:
> @DamonGuy Tested with the patch. Observed that the key code and extended > modifier differ for left vs right option key. This is not the case for other > left/right modifier keys such as Shift, Command. I think some extra flags > (key masks) are being set in case of **Right Option Key**. > > ``` > LEFT SHIFT KEY > ----------------- > KEY PRESSED: > key code = 16 (⇧) > extended modifiers = 64 (⇧) > action key? NO > key location: left > KEY RELEASED: > key code = 16 (⇧) > extended modifiers = 0 (no extended modifiers) > action key? NO > key location: left > > RIGHT SHIFT KEY > ----------------- > KEY PRESSED: > key code = 16 (⇧) > extended modifiers = 64 (⇧) > action key? NO > key location: right > KEY RELEASED: > key code = 16 (⇧) > extended modifiers = 0 (no extended modifiers) > action key? NO > key location: right > > ------------------------------------------------------------------ > > LEFT OPTION KEY > ------------------ > KEY PRESSED: > key code = 18 (⌥) > extended modifiers = 512 (⌥) > action key? NO > key location: left > KEY RELEASED: > key code = 18 (⌥) > extended modifiers = 0 (no extended modifiers) > action key? NO > key location: left > > RIGHT OPTION KEY > ------------------- > KEY PRESSED: > key code = 65406 (⌥) > extended modifiers = 8704 (⌥+⌥) > action key? NO > key location: right > KEY RELEASED: > key code = 65406 (⌥) > extended modifiers = 0 (no extended modifiers) > action key? NO > key location: right > ``` Thanks for catching this. I believe the edit I just pushed fixes this. My test now shows the correct key code and location on my end. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15432#issuecomment-1696425021