Skip to content

Conversation

@nitishagar
Copy link
Contributor

Fixes #957 - Paste modal now correctly detects Spanish characters requiring AltRight modifier (@, |, #) and accented characters (ñ) by normalizing all input text to NFC form before keyboard layout lookup.

Root cause: macOS and other sources may provide text in NFD (decomposed) form while keyboard layouts store characters in NFC (composed) form. JavaScript object property lookup requires exact byte match, causing lookups to fail despite characters being defined.

Solution: Apply .normalize('NFC') to all user input characters before validation and paste execution.

Testing: Browser-based validation testing completed with Spanish keyboard layout (es-ES) using text from multiple sources (TextEdit, Safari, Notes) on macOS. Hardware testing requires JetKVM device.

Fixes jetkvm#957 - Paste modal now correctly detects Spanish characters
requiring AltRight modifier (@, |, #) and accented characters (ñ)
by normalizing all input text to NFC form before keyboard layout
lookup.

Root cause: macOS and other sources may provide text in NFD
(decomposed) form while keyboard layouts store characters in NFC
(composed) form. JavaScript object property lookup requires exact
byte match, causing lookups to fail despite characters being defined.

Solution: Apply .normalize('NFC') to all user input characters before
validation and paste execution.

Testing: Browser-based validation testing completed with Spanish
keyboard layout (es-ES) using text from multiple sources (TextEdit,
Safari, Notes) on macOS. Hardware testing requires JetKVM device.
@adamshiervani adamshiervani merged commit e293edb into jetkvm:dev Nov 17, 2025
4 checks passed
@nitishagar nitishagar deleted the fix-957 branch November 20, 2025 05:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Paste can't detected certain characters

2 participants