fix(desktop): prevent modifier key buffer resets, clipboard race on terminal accept, and redundant UIA settle snapshots
This commit is contained in:
parent
6d909dd0e5
commit
41901c1ec5
10 changed files with 198 additions and 23 deletions
|
|
@ -119,6 +119,8 @@ export function classifyKeyStroke(
|
|||
code: number,
|
||||
modifiers: { ctrl: boolean; alt: boolean; meta: boolean }
|
||||
): KeyStrokeClass {
|
||||
if (code >= 0xa0 && code <= 0xa5) return 'modifier'
|
||||
if (code === 0x5b || code === 0x5c || code === 0x10 || code === 0x11 || code === 0x12) return 'modifier'
|
||||
if (modifiers.ctrl || modifiers.alt || modifiers.meta) return 'shortcut'
|
||||
if (code >= 0x41 && code <= 0x5a) return 'letter'
|
||||
if (code >= 0x30 && code <= 0x39) return 'digit'
|
||||
|
|
@ -131,8 +133,6 @@ export function classifyKeyStroke(
|
|||
if (code >= 0x25 && code <= 0x28) return 'arrow'
|
||||
if (code >= 0x21 && code <= 0x24) return 'navigation'
|
||||
if (code >= 0x70 && code <= 0x87) return 'function'
|
||||
if (code >= 0xa0 && code <= 0xa5) return 'modifier'
|
||||
if (code === 0x5b || code === 0x5c || code === 0x10 || code === 0x11 || code === 0x12) return 'modifier'
|
||||
if (code === 0x1b) return 'navigation'
|
||||
if (code >= 0xba && code <= 0xc0) return 'symbol'
|
||||
if (code >= 0xdb && code <= 0xde) return 'symbol'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue