You are not logged in.

#1 2020-10-01 15:57:54

roachsinai
Member
Registered: 2016-10-23
Posts: 11

[SOLVED]How to swap tab key and shift key?

I have use

setxkbmap -option ctrl:nocaps

to remap capslock to contrl.

I've read

man xkeyboard-config

, seems setxkbmap doesn't support change behavior of tab key and shift key.

Is there a way to make it?

Thanks in advance!

Last edited by roachsinai (2020-10-04 02:59:33)

Offline

#2 2020-10-01 19:04:28

Wild Penguin
Member
Registered: 2015-03-19
Posts: 406

Re: [SOLVED]How to swap tab key and shift key?

Maybe keyfuzz?

This will be done on the Kernel level. To make it persistent you need to enable a service, I'm not sure if the AUR package includes one.

Offline

#3 2020-10-01 21:06:16

roachsinai
Member
Registered: 2016-10-23
Posts: 11

Re: [SOLVED]How to swap tab key and shift key?

Wild Penguin wrote:

Maybe keyfuzz?

This will be done on the Kernel level. To make it persistent you need to enable a service, I'm not sure if the AUR package includes one.

Thanks a lot for your suggestion! I'll try it!

Offline

#4 2020-10-02 00:09:47

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

Re: [SOLVED]How to swap tab key and shift key?

Assuming you are using Xorg and not Wayland, you can try xmodmap and wrap it as a script or function and run it inside .xinitrc. Following is a example for swap caps_lock and control:

$ xmodmap -pke
...
$xmodmap - <<-EOF
remove lock = Caps_Lock
remove Control = Control_L
keysym Control_L = Caps_Lock
keysym Caps_Lock = Control_L
add Lock = Caps_Lock
add Control = Control_L
EOF

Last edited by solskog (2020-10-02 00:17:36)

Offline

#5 2020-10-02 12:52:59

roachsinai
Member
Registered: 2016-10-23
Posts: 11

Re: [SOLVED]How to swap tab key and shift key?

solskog wrote:

Assuming you are using Xorg and not Wayland, you can try xmodmap and wrap it as a script or function and run it inside .xinitrc. Following is a example for swap caps_lock and control:

$ xmodmap -pke
...
$xmodmap - <<-EOF
remove lock = Caps_Lock
remove Control = Control_L
keysym Control_L = Caps_Lock
keysym Caps_Lock = Control_L
add Lock = Caps_Lock
add Control = Control_L
EOF

Thanks!Code below exchange Tab and Shift_L.

xmodmap -e "keycode 23 = Shift_L"
xmodmap -e "keycode 50 = Tab"

Offline

#6 2020-10-03 17:19:12

scrouthtv
Member
Registered: 2019-10-15
Posts: 38

Re: [SOLVED]How to swap tab key and shift key?

Offline

Board footer

Powered by FluxBB