You are not logged in.

#1 2020-11-12 22:55:17

antarchtic
Member
Registered: 2020-11-11
Posts: 15

[SOLVED] Allow switching keyboard layout when locked

I use i3 with i3lock and 2 keyboard layouts, after lock I can't change layout and I have to kill i3lock from root...
I read man page and I didn't see options I need, only --pass-media-keys --pass-power-keys etc. but no option for custom shortcuts.
My keys is Alt+Shift. I was thinking about making a sysd service, but I would like to somehow solve the problem with the rights of a regular user.
How can I solve this problem correctly? Maybe there is a better option

Last edited by antarchtic (2020-11-13 11:01:34)

Offline

#2 2020-11-13 08:13:04

seth
Member
Registered: 2012-09-03
Posts: 51,315

Re: [SOLVED] Allow switching keyboard layout when locked

after lock I can't change layout and I have to kill i3lock from root

Can you please elaborate on that relation?
Would it help you to have i3lock auto-select a layout? => https://aur.archlinux.org/packages/xkb-switch/
Or just show it? ("--keylayout 0")

Online

#3 2020-11-13 11:00:53

antarchtic
Member
Registered: 2020-11-11
Posts: 15

Re: [SOLVED] Allow switching keyboard layout when locked

seth wrote:

after lock I can't change layout and I have to kill i3lock from root

Can you please elaborate on that relation?
Would it help you to have i3lock auto-select a layout? => https://aur.archlinux.org/packages/xkb-switch/
Or just show it? ("--keylayout 0")

No there is no such function, I have already added setxkbmap to locker script.
xkb-switch helped a lot:

xkb-switch -s "us"

instead

setxkbmap en
#back to normal map
setxkbmap -model pc104 -layout us,ru -variant ,, -option grp:alt_shift_toggle

Offline

#4 2020-11-13 13:23:32

seth
Member
Registered: 2012-09-03
Posts: 51,315

Re: [SOLVED] Allow switching keyboard layout when locked

Online

#5 2020-11-13 21:51:12

antarchtic
Member
Registered: 2020-11-11
Posts: 15

Re: [SOLVED] Allow switching keyboard layout when locked

seth wrote:

Now, I use i3lock-color too.
I used I3lock-fancy thinking about i3lock-color comes with package, but it turned out what i3lock-color and i3lock is conflicting packages with same name of binaries) But i3lock-fancy works with both and doesn't uses i3lock-color functionality if not installed. It confused me in the beginning.

Offline

Board footer

Powered by FluxBB