feat(ui): enable multiple keyboard layouts for "paste text" to remote host (#405)

* Enable multiple keyboard layouts for paste text from host

* Trema is the more robust method for capital umlauts

* Improve error handling and pre-loading

* Improve accent handling

* Remove obscure Alt-Gr keys, unsure if they are supported everywhere

* Add Swiss French

* Change line ordering

* Fix whitespace

* Add French (France)

* Add English (UK)

* Add Swedish

* Add Spanish

* Fix fr_FR special characters

* Add more keys to Spanish

* Remove default value shift: false

* Add Norwegian

* Operator precedence 🤦

* Add Italian

* Add Czech

* Move guard statements outside of loop

* Move language name definitions into the keyboard layout files

* Change the locale names to their native language

German->Deutsch et. al.

* Move hold key handling into Go backend analogous to https://www.kernel.org/doc/Documentation/usb/gadget_hid.txt

* Remove trailing whitespace

* Fix

* Add Belgisch Nederlands

* Add JSONRPC handling

* Use useSettingsStore

* Revert "Move hold key handling into Go backend analogous to https://www.kernel.org/doc/Documentation/usb/gadget_hid.txt"

This reverts commit 146cee9309ca7a8b7ab103e955f3fcc38a4bc692.

* Move FeatureFlag to navigation

* Fix: flip Y/Z

* Add useEffect dependencies

* Embolden language

* Add to useCallback dependencies

---------

Co-authored-by: Marc Brooks <IDisposable@gmail.com>
This commit is contained in:
Daniel Lorch
2025-05-21 17:40:48 +02:00
committed by GitHub
parent 590c606bb1
commit b91a995918
22 changed files with 1942 additions and 133 deletions

View File

@@ -302,6 +302,9 @@ interface SettingsState {
backlightSettings: BacklightSettings;
setBacklightSettings: (settings: BacklightSettings) => void;
keyboardLayout: string;
setKeyboardLayout: (layout: string) => void;
}
export const useSettingsStore = create(
@@ -330,6 +333,9 @@ export const useSettingsStore = create(
},
setBacklightSettings: (settings: BacklightSettings) =>
set({ backlightSettings: settings }),
keyboardLayout: "en-US",
setKeyboardLayout: layout => set({ keyboardLayout: layout }),
}),
{
name: "settings",