tiny-pilot / tinypilot

Use your Raspberry Pi as a browser-based KVM.
https://tinypilotkvm.com
MIT License
3.07k stars 259 forks source link

Support German (de-DE) keyboard layouts when pasting #1842

Closed DustyDiamond closed 2 months ago

DustyDiamond commented 3 months ago

This PR adds a detection mechanism for the German de-DE locale in the paste feature. In this case, it uses the correct mapping, and ensures that all characters come through correctly.

Original PR description

Hi, I added the translation table for German Special Characters. The Manual definition of ALT_GR is necessary since on german layouts the AltGr Key doesnt behave like the MODIFIER_RIGHT_ALT. In Tinypilot, pressing AltGr is interpreted like Ctrl Left + Alt Right which translates to hex 0x41, but it should be Ctrl Left + Alt Left (Hex 0x05) to work for German Special Characters.

Closes #1830

For an Quick overview for anyone later reading this, this would support the following special Characters:

!"§$%&(){}[]/+*#'-_.:,;äöüÄÖÜ<>|€?ß\~`´

Greetings from Germany :) Review on CodeApprove

cghague commented 3 months ago
Automated comment from CodeApprove ➜

⏳ @jotaen4tinypilot please review this Pull Request

cghague commented 3 months ago
Automated comment from CodeApprove ➜

⏳ @jdeanwallace please review this Pull Request

jotaen4tinypilot commented 3 months ago

@jdeanwallace I have a German keyboard at hand for testing, so I’m happy to take care of the review. (Feel free to chime in anyways, but otherwise feel free to disregard or unassign your review request.)