You are not logged in.

#1 2019-03-22 12:11:28

dracofrancis
Member
Registered: 2019-03-03
Posts: 18

[SOLVED} keyboard layout changes layout when I startx (exec i3)

Hello everyone,

I am trying to configure my keyboard layout to uk and gr (Greek). Before I startx (I use i3 btw) the uk layout works fine. Once I go into X the keyboard goes back to us layout.
This is the output of setxkbmap -print:

$ setxkbmap -print -verbose 10
Setting verbose level to 10
locale is C
Trying to load rules file ./rules/evdev...
Trying to load rules file /usr/share/X11/xkb/rules/evdev...
Success.
Applied rules from evdev:
rules:      evdev
model:      pc105
layout:     uk,gr
variant:    ,dvorak
options:    grp:alt_shift_toggle
Trying to build keymap using the following components:
keycodes:   evdev+aliases(qwerty)
types:      complete
compat:     complete
symbols:    pc+uk+gr(dvorak):2+inet(evdev)+group(alt_shift_toggle)
geometry:   pc(pc105)
xkb_keymap {
	xkb_keycodes  { include "evdev+aliases(qwerty)"	};
	xkb_types     { include "complete"	};
	xkb_compat    { include "complete"	};
	xkb_symbols   { include "pc+uk+gr(dvorak):2+inet(evdev)+group(alt_shift_toggle)"	};
	xkb_geometry  { include "pc(pc105)"	};
};

This is my current /etc/X11/xorg.conf.d/00-keyboard.conf

Section "InputClass"
        Identifier "keyboard-all"
        Driver "evdev"
        Option "XkbLayout" "uk,gr"
        Option "XkbModel" "pc105"
        Option "XkbVariant" ",dvorak"
        Option "XkbOptions" "grp:alt_shift_toggle"
EndSection

and also when I execute $ xkb-switch I get uk back.

Do you have any ideas? I tried to follow the arch wiki as closely as possible.

My keyboard is a logitech G413.

Thanks in advance for you help guys/girls.

Last edited by dracofrancis (2019-03-23 22:26:55)

Offline

#2 2019-03-23 21:43:30

GrimBandito
Member
Registered: 2016-12-04
Posts: 48

Re: [SOLVED} keyboard layout changes layout when I startx (exec i3)

When in the virtual console, the uk keyboard layout is for united kingdom. When you then startx, the keyboard layout changes to gb. So in your 00-keyboard file change uk to gb.

Or issue the following command to configure your keyboard correctly;

sudo localectl set-x11-keymap gb,gr pc105 ,dvorak grp:alt_shift_toggle

This permanantly sets the keyboard layout for both the virtual terminal (vconsole.conf) and the xorg/graphical gui (00-keyboard.conf). Hope this helps.

Last edited by GrimBandito (2019-03-23 21:56:03)

Offline

#3 2019-03-23 22:26:39

dracofrancis
Member
Registered: 2019-03-03
Posts: 18

Re: [SOLVED} keyboard layout changes layout when I startx (exec i3)

Solved! Thank you very much. Now I understand how it works and I fixed it. It is a bit confusing tbh.

Offline

Board footer

Powered by FluxBB