I have a project i’m working on that uses a modified version of the GitHub - balenalabs/balena-dash: Build a Raspberry Pi based desktop dashboard for stats, photos, videos and more! example. The issue i’m having at the moment is that i can’t figure out how to change the keyboard layout to the Belgian one.
I can’t find anything in the docs related to changing the keyboard layout. Any help is greatly apreciated.
I am one of the maintainer of balenaDash
If I understand correctly, you want to change the keyboard input to possibly Belgian AZERTY layout?
I haven’t personally tried this, but you should be able to do this by changing the locale. The current version of balenaDash is based on the browser block which is itself based on raspbian/debian, X11 and chromium.
You mentioned you are using a modified version, you can try installing a tool like localctl in the kisok service and set the proper keyboard layout.
We would be grateful for your feedback on how this goes. We also really appreciate PRs if you figure this out - we can add the instructions to the browser-block on how to customise the keyboard layout.
Hope this helps
So i figured it out. It’s actually not that hard.
adding in this:
sed -i 's/XKBLAYOUT="us"/XKBLAYOUT="be"/' /etc/default/keyboard
dpkg-reconfigure keyboard-configuration -f noninteractive
to the launch.sh file in the balena-dash/launch.sh at master · balenalabs/balena-dash · GitHub file and then rebooting the device after it gets the update changes the keyboard layout.
Another quirk is that the keyboard should be connected before booting or it is not recognized.
I will make a pull request for it later to the balena-dash repo with a environment variable that can be set.
Thanks for your help by pointing me in the right direction.
Hey glad to know you figured it out! PR is much appreciated and welcome
Very late to this, but adding it here in case others are using your code.
If you add
service keyboard-setup restart after your code a restart of the system is not required anymore.