balena-wpe icon indicating copy to clipboard operation
balena-wpe copied to clipboard

Keyboard layout

Open Julio-Guerra opened this issue 6 years ago • 2 comments

Hi,

First of all, nice job for this project. I would like to know how can I change the keyboard layout to something else than US qwerty? I tried the loadkeys command and to set the LANG variable but nothing changed.

Thank you

Julio-Guerra avatar Feb 05 '18 20:02 Julio-Guerra

cc @curcuz ^

floion avatar Feb 06 '18 01:02 floion

@Julio-Guerra this is a bit harder than it sounds because WPE is running without any window/display manager underneath it. The keyboard events are handled here https://github.com/resin-io/WPEBackend-rdk/blob/master/src/input/LinuxInput/KeyboardEventHandlerLinuxInput.cpp#L164 where key codes are mapped to unicode characters. I already had to patch this version to fix issue #5. I guess to have multiple languages you'd have to add multiple mapping in there and also add logic to handle switching layouts using some combination like Alt + Shift.

petrosagg avatar Feb 18 '18 22:02 petrosagg