keyEventLayoutKey
Extract the layout-aware key name from a KeyEvent for shortcut matching.
On a Dvorak layout, pressing the physical QWERTY 'B' key (which produces 'x' on Dvorak) should return "x", not "b". This enables keyboard shortcuts to follow the user's layout rather than hardcoded QWERTY positions.
When Ctrl is held, the OS typically sends control characters (1-26 for a-z); this function recovers the original letter.
Returns null if the layout-aware character cannot be determined, in which case callers should fall back to the physical key name.
Extract the layout-aware key name from a KeyEvent for shortcut matching.
On a Dvorak layout, pressing the physical QWERTY 'B' key (which produces 'x' on Dvorak) should return "x", not "b". This enables keyboard shortcuts to follow the user's layout rather than hardcoded QWERTY positions.
When Ctrl is held, the OS typically sends control characters (1-26 for a-z); this function recovers the original letter.
Returns null if the layout-aware character cannot be determined, in which case callers should fall back to the physical key name.
Extract the layout-aware key name from a KeyEvent for shortcut matching.
On a Dvorak layout, pressing the physical QWERTY 'B' key (which produces 'x' on Dvorak) should return "x", not "b". This enables keyboard shortcuts to follow the user's layout rather than hardcoded QWERTY positions.
When Ctrl is held, the OS typically sends control characters (1-26 for a-z); this function recovers the original letter.
Returns null if the layout-aware character cannot be determined, in which case callers should fall back to the physical key name.
Extract the layout-aware key name from a KeyEvent for shortcut matching.
On a Dvorak layout, pressing the physical QWERTY 'B' key (which produces 'x' on Dvorak) should return "x", not "b". This enables keyboard shortcuts to follow the user's layout rather than hardcoded QWERTY positions.
When Ctrl is held, the OS typically sends control characters (1-26 for a-z); this function recovers the original letter.
Returns null if the layout-aware character cannot be determined, in which case callers should fall back to the physical key name.