I thought this would be trivial, but after two hours of googling and experimenting still nothing works.
I want to use the ROS+Kinetic-lxde o/s sd image for the Raspberry Pi. As far as I can tell this is Lubuntu. Unfortunately the keyboard layout in the image does not match my keyboard, so I need to change it.
So far I have tried localectl from the command line. That does not do anything. I tried localectl list-keymaps and that says it can't find any console keymaps.
I added the 'Keyboard Layout Handler' applet to the task bar and set the keyboard through that. My changes were lost when I rebooted.
I tried sudo dpkg-reconfigure keyboard-configuration. That let me set up the keyboard, but again the changes were lost after a reboot.
I tried editing the file /etc/default/keyboard, but that already had the correct settings and they are doing no good.
So, how can I permanently set the keyboard type ? It seems crazy that it can't be done easily.
Here details from the Lubuntu/Keyboard article section Keyboard Mapping:
It's likely that
/etc/defaults/keyboard
defines the default keyboard layout used by the system and X server, but it's possible that Lubuntu's desktop environment (LXDE) has it's own configuration files that override that.