<solved more or less> CapsLock & .Xmodmap headaches

Questions about hardware,drivers and peripherals
Forum rules
Before you post please read how to get help
Post Reply
sadhu
Level 5
Level 5
Posts: 503
Joined: Fri Nov 22, 2013 9:48 am
Contact:

<solved more or less> CapsLock & .Xmodmap headaches

Post by sadhu » Tue Feb 06, 2018 2:20 am

On my laptop, i have the following .Xmodmap stored in ~/.local/share:

Code: Select all

keycode 58 = Shift_L Caps_Lock NoSymbol NoSymbol
pointer = 1 0 3 4 5 6 7 8 9 10 11 12 13 14 15 16
It works:
  • Line 1 causes CapsLock to act as the Shift key, and Shift-CapsLock actually toggles the CapsLock function
  • Line 2 disables the middle mouse button, which prevents me from pasting when I scroll through a long document.
It's when I get back to my desktop that problems arise. First, the mouse middle button is disabled, so therefore .Xmodmap is being read. However, I can't seem to get the caps lock to switch.

I'm using a Logitech K120 (standard US) keyboard. Showkeys yields

Code: Select all

keycode  58 press
keycode  58 release
Moreover, neither of the 2nd or 3rd selections on System Settings > Keyboard > Layouts > Options see to work: "Caps Lock acts as Shift with Locking..." I would like the third setting, where Shift pauses the caps lock function. But neither of these work. Bug?

I have two questions:

1) What must I do to get .Xmodmap to work?
2) Where can I find documentation for ALL of these selections on Keyboard Layout Options? Some of the others seem intriguing. (I hate experimenting; I'd rather just read the manual.)


Thanks

Sadhu
Last edited by sadhu on Tue Feb 06, 2018 2:08 pm, edited 1 time in total.
sabbe sattā bhavantu sukhitattā. LN 18.3-64 Cinn 3.4.6, Mobo: ASUSTeK STRIX B250G GAMING v, Dual core Pntm G4560, Intel Gfx. Laptop:Dell Inspiron 15-3000, Core i3, 4G RAM Intel Gfx

deepakdeshp
Level 11
Level 11
Posts: 3777
Joined: Sun Aug 09, 2015 10:00 am

Re: lm18.2-64-Cin CapsLock & .Xmodmap headaches

Post by deepakdeshp » Tue Feb 06, 2018 10:39 am

Code: Select all

man xmodmap
gives the manual for this utility. Similarly you can see man for the utilities at the see also section at the bottom of the man page
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help, and keeps the forum clean.
I am using Mint 19 Cinnamon 64 bit with AMD A8/7410 processor . Memory 8GB

sadhu
Level 5
Level 5
Posts: 503
Joined: Fri Nov 22, 2013 9:48 am
Contact:

Re: lm18.2-64-Cin CapsLock & .Xmodmap headaches

Post by sadhu » Tue Feb 06, 2018 11:38 am

deepakdeshp wrote:

Code: Select all

man xmodmap
gives the manual for this utility. Similarly you can see man for the utilities at the see also section at the bottom of the man page
Yes, thanks, that helps for xmodmap. As it is, I used the command xmodmap -pke to a list of keys, and it turns out Caps_Lock is key 66, not 58 as shown by sudo showkey. After editing .Xmodmap as follows

Code: Select all

keycode  66 = Shift_L Caps_Lock NoSymbol Caps_Lock
pointer = 1 0 3 4 5 6 7 8 9 10 11 12 13 14 15 16
then running sudo xmodmap .Xmodmap, everything's working properly.

But the other questions remain: Where can I find a discussion about the keyboard layout options in the System Properties? Why did I have to edit .Xmodmap instead of just selecting items 2 or 3 on the Keyboard Layout Options window?

I'll mark it solved when I get answers to those two questions. ---because for a newbie or non-Linux guru, clicking checkboxes is much easier than playing around with xmodmap.

Thanks,

-Sadhu
sabbe sattā bhavantu sukhitattā. LN 18.3-64 Cinn 3.4.6, Mobo: ASUSTeK STRIX B250G GAMING v, Dual core Pntm G4560, Intel Gfx. Laptop:Dell Inspiron 15-3000, Core i3, 4G RAM Intel Gfx

deepakdeshp
Level 11
Level 11
Posts: 3777
Joined: Sun Aug 09, 2015 10:00 am

Re: lm18.2-64-Cin CapsLock & .Xmodmap headaches

Post by deepakdeshp » Tue Feb 06, 2018 12:59 pm

This may help.
In a shell:

Code: Select all

man keyboard
sudo dpkg-reconfigure keyboard-configuration
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help, and keeps the forum clean.
I am using Mint 19 Cinnamon 64 bit with AMD A8/7410 processor . Memory 8GB

Post Reply

Return to “Hardware Support”