Keyboard layout


  • I bought the command sdcard and had to re-pair the keyboard. Did that, and keyboard layout states it's configured for the "us", but it's not, it's configured for the uk even though /etc/default/keyboard states:

    # KEYBOARD CONFIGURATION FILE

    # Consult the keyboard(5) manual page.

    XKBMODEL="pc105"
    XKBLAYOUT="us"
    XKBVARIANT=""
    XKBOPTIONS=""

    BACKSPACE="guess"

    It worked fine under the previous sdcard. The only change was launching the new sdcard.

    I could go to the trouble of manually mapping keys to the correct setting, but would rather hear if Spec5 has any suggestions?



  • Hey Scott,

    I tested the keyboard on our master image and on a couple of the units we're shipping, and I haven't been able to replicate this. All of ours are coming up correctly with the US layout. Since /etc/default/keyboard on your card is already showing "US", the problem is almost certainly in the desktop session's own keyboard config rather than the system one.

    Raspberry Pi OS uses Labwc for the graphical desktop, and it maintains keyboard settings for the desktop session in:

    ~/.config/labwc/environment

    Normally, raspi-config synchronizes this with /etc/default/keyboard, so I'd try forcing it to reapply the US layout first.

    In a terminal on the Nomad, run:

    sudo raspi-config nonint do_configure_keyboard us

    Then reboot:

    sudo reboot

    After the reboot, check the keyboard again.

    If it's still coming up as UK:

    mkdir -p ~/.config/labwc

    printf 'XKB_DEFAULT_MODEL=pc105\nXKB_DEFAULT_LAYOUT=us\nXKB_DEFAULT_VARIANT=\nXKB_DEFAULT_OPTIONS=\n' > ~/.config/labwc/environment

    sudo reboot

    If that still doesn't do it, send me the output of cat ~/.config/labwc/environment and I'll take it from there.

    Thanks,
    Jake


  • Jake,

         The raspi-config worked like a charm. Thanks for the info, and I'll tuck that away. I switch between RHEL, Fedora, and Debian, so sometimes the rpi stuff gets hard to troubleshoot.

    Thanks

    Scott


Please login to reply to this topic!