You are not logged in.

#1 2023-10-01 15:04:33

mrmonk
Member
Registered: 2023-10-01
Posts: 13

Where do I set my keyboard layout via SDDM to UK on boot?

When I get to the SDDM login screen, it swaps @ for " and # for alt + 3.

When I've logged it its fine as Hyprland sets it correctly, I'm guessing I need to set it on SDDM or earlier in the call stack?

Offline

#3 2023-10-01 15:15:10

mrmonk
Member
Registered: 2023-10-01
Posts: 13

Re: Where do I set my keyboard layout via SDDM to UK on boot?

Yes I've already enabled en_GB and ran locale-gen but it still isn't getting picked up by SDDM.

I've also set LANG in /etc/locale./conf to en_GB.UTF-8

Last edited by mrmonk (2023-10-01 15:24:10)

Offline

#4 2023-10-01 16:15:24

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 68,362

Re: Where do I set my keyboard layout via SDDM to UK on boot?

The locale and LANG variables aren't relevant, keyboard layout is just also handled by localectl.

localectl

and, assuming you're using SDDM on X11, please post your Xorg log, https://wiki.archlinux.org/title/Xorg#General

Offline

#5 2023-10-01 19:46:52

mrmonk
Member
Registered: 2023-10-01
Posts: 13

Re: Where do I set my keyboard layout via SDDM to UK on boot?

I see thanks for that information.
I am on wayland not X11

Here is my output of locale

➜  ~ locale
LANG=en_GB.UTF-8
LC_CTYPE="en_GB.UTF-8"
LC_NUMERIC="en_GB.UTF-8"
LC_TIME="en_GB.UTF-8"
LC_COLLATE="en_GB.UTF-8"
LC_MONETARY="en_GB.UTF-8"
LC_MESSAGES="en_GB.UTF-8"
LC_PAPER="en_GB.UTF-8"
LC_NAME="en_GB.UTF-8"
LC_ADDRESS="en_GB.UTF-8"
LC_TELEPHONE="en_GB.UTF-8"
LC_MEASUREMENT="en_GB.UTF-8"
LC_IDENTIFICATION="en_GB.UTF-8"

Last edited by mrmonk (2023-10-01 19:49:03)

Offline

#6 2023-10-01 19:52:11

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 68,362

Re: Where do I set my keyboard layout via SDDM to UK on boot?

"locale" is irrelevant, "localectl" however will also print the global keyboard config (for X11 but in a location where wayland compositors typically pick it up)

Offline

#7 2023-10-01 19:53:16

mrmonk
Member
Registered: 2023-10-01
Posts: 13

Re: Where do I set my keyboard layout via SDDM to UK on boot?

Thanks for that.
localectl gives the following:

System Locale: LANG=en_GB.UTF-8
    VC Keymap: (unset)         
   X11 Layout: (unset)     

I checked for /etc/X11 but it doesn't exist. will try and look into where this file is...

setxkbmap gives an error

➜  ~ setxkbmap en_GB
WARNING: Running setxkbmap against an Xwayland server
Error loading new keyboard description

Last edited by mrmonk (2023-10-01 19:54:33)

Offline

#8 2023-10-01 20:01:32

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 68,362

Re: Where do I set my keyboard layout via SDDM to UK on boot?

https://wiki.archlinux.org/title/Xorg/K … _localectl
Pay attention to the "by passing an empty string" passage.

Offline

#9 2023-10-01 20:09:32

mrmonk
Member
Registered: 2023-10-01
Posts: 13

Re: Where do I set my keyboard layout via SDDM to UK on boot?

I've tried the following, but I still don't get the correct keyboard (" should be @ but @ is " shift + @ key, even in tty

echo "KEYMAP=gb" | sudo tee -a /etc/vconsole.conf
localectl --no-convert set-x11-keymap gb pc104 ,dvorak grp:win_space_toggle

It seems listed with localectl list-keymaps

Last edited by mrmonk (2023-10-01 20:10:00)

Offline

#10 2023-10-01 20:19:41

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 68,362

Re: Where do I set my keyboard layout via SDDM to UK on boot?

vconsole is irrelevant and the localectl call is wrong  - you've only one layout (gb) but try to set the variants for two (,dvorak) and add a toggle.
Don't blindly copypaste the blue boxes.
Post the output of "localectl" (though afaiu it just mindlessly writes whatever you ask for w/o any sanity checks) and then please link the image from https://en.wikipedia.org/wiki/British_a … _keyboards that looks like the keyboard in front of you.

Offline

#11 2023-10-01 20:25:20

mrmonk
Member
Registered: 2023-10-01
Posts: 13

Re: Where do I set my keyboard layout via SDDM to UK on boot?

So this would suffice?

localectl --no-convert set-x11-keymap gb pc104

localectl:

System Locale: LANG=en_GB.UTF-8
    VC Keymap: (unset)         
   X11 Layout: gb
    X11 Model: pc104

Here is my keyboard: https://upload.wikimedia.org/wikipedia/ … om_Ext.png

Last edited by mrmonk (2023-10-01 20:26:05)

Offline

#12 2023-10-01 20:49:00

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 68,362

Re: Where do I set my keyboard layout via SDDM to UK on boot?

The variant for that is "extd", though I guess you're only really after the basic UK layout but are getting the US default.
Please try the bahvior w/ SDDM on X11 - your config doesn't look wrong at this point and https://wiki.archlinux.org/title/SDDM#S … ard_layout sounds likely DMMS loads it agnostic of the display server, might be a bug in its wayland backend, though.

Offline

Board footer

Powered by FluxBB