You are not logged in.

#1 2020-10-01 21:49:38

Pomegranate
Member
Registered: 2020-10-01
Posts: 11

[SOLVED] Changing keyboard layout automatically on boot

I'm trying to change my keyboard layout when I start my computer. I can manually enable it in the terminal like this:

setxkbmap -layout us,us -variant dvorak-custom, -option grp:alt_shift_toggle

This works, however it doesn't save when I restart. So I tried configuring the localectl like this:

localectl --no-convert set-x11-keymap us,us pc86 dvorak-custom, grp:alt_shift_toggle

Having done this, the output of localectl status is as follows:

[pomegranate@tree ~]$ localectl
   System Locale: LANG=en_US.UTF-8
       VC Keymap: dvorak
      X11 Layout: us,us
       X11 Model: pc86
     X11 Variant: dvorak-custom,
     X11 Options: grp:alt_shift_toggle

Seems all good, but the layout doesn't actually change after a restart. It just stays on standard US.
I also tried adding

setxkbmap -layout us,us -variant dvorak-custom, -option grp:alt_shift_toggle

to my .xinitrc file, but that didn't work either.

Is there anything I'm missing here? I'm not sure what else to do.

Last edited by Pomegranate (2020-10-02 10:28:37)

Offline

#2 2020-10-01 23:40:36

solskog
Member
Registered: 2020-09-05
Posts: 462

Re: [SOLVED] Changing keyboard layout automatically on boot

All these settings assuming you are using Xorg. if it's not working, you are probably using Wayland. check this thread:
https://bbs.archlinux.org/viewtopic.php?id=259356

Offline

#3 2020-10-01 23:48:10

regid
Member
Registered: 2016-06-06
Posts: 208

Re: [SOLVED] Changing keyboard layout automatically on boot

Can it be that the window manager or desktop environment has its own method to set the layout? Which one are you using?
Is there related information at the X log?
Perhaps the Applications & Desktop Environments forum is a better place to ask.

Offline

#4 2020-10-02 10:28:08

Pomegranate
Member
Registered: 2020-10-01
Posts: 11

Re: [SOLVED] Changing keyboard layout automatically on boot

regid wrote:

Can it be that the window manager or desktop environment has its own method to set the layout?

You're right! KDE had its own keyboard layout setting which was overiding the x11 layout. Simly removing the standard us setting fixed it. Thanks!

Offline

Board footer

Powered by FluxBB