3

I try to configure my desired keyboard combination using setxkbmap but it seems some options are not compatible, because when I pass my desired options one of them has no affect.

I want both Left Shift and Right Shift to toggle Caps Lock, Caps Lock key as Alt Gr and Alt+Shift to switch layouts.

I was not able to have all together working while they work when I try them one by one. Can anybody give me the correct command?

This is the command that I have used:

setxkbmap -layout de,us,ir -option "lv3:caps_switch" -option "shift:both_capslock" -option "grp:alt_shift_toggle"
Artur Meinild
  • 26,018
mehdix
  • 309

1 Answers1

2

To make both Shift keys together toggle Caps Lock (see the output of grep 'shift:both_capslock' /usr/share/X11/xkb/rules/xorg.lst command):

setxkbmap -option shift:both_capslock

To switch Caps Lock to Alt Gr:

xmodmap -e "keycode 66 = Alt_R Meta_R Alt_R Meta_R"

To switch layout using Alt+Shift keyboard shortcut, see the following post if you are using Ubuntu 13.10:

For Ubuntu 13.04 and older see:

Radu Rădeanu
  • 169,590
  • Thanks Radu, but what I need is to set pressing both shift keys together to act as caps lock while the other options work as well. With setxkbmap this can be realized by -option "shift:both_capslock". – mehdix Jan 11 '14 at 13:48
  • @MahdiSadeghi You wasn't so clear in this sense... I just updated my answer. – Radu Rădeanu Jan 11 '14 at 14:09