You are not logged in.

#1 2011-06-07 23:21:17

ERiS
Member
Registered: 2011-03-15
Posts: 20

Disable Caps Lock & remap Menu to Super_R with xmodmap no longer works

IMPORTANT:
I need to disable the Caps Lock key, not swap it with something else, not yank the key out.
Even though the Lock is disabled, I use it as a Push to Talk in VoiP.

It's been months since I've been trying to get this to work, where previously, it worked flawlessly. Lots of Googling and asking around gave me nothing.

In the past, I've used:
remove Lock = Caps_Lock
on my .xmodmap, to disable my Caps Lock.
But now nothing happens, the Caps Lock works as a normal... Caps Lock.

And I used:
keysym Menu = Super_R
!add Super = Super_R

To change the Menu key to a Right Windows key.
But now, it will say:
xmodmap:  /home/eris/.xmodmap:2:  bad keysym target keysym 'Menu', no corresponding keycodes
And the key keeps being used as a Menu key.

I've not been able to find a fix since. Does anyone have a workaround?
I use Openbox, if it matters.
Thanks in advance..!

Offline

#2 2011-06-08 09:48:49

hermes
Member
From: Lucca, Italy
Registered: 2010-05-19
Posts: 99

Re: Disable Caps Lock & remap Menu to Super_R with xmodmap no longer works

$ setxkbmap -option caps:none

Look at /usr/share/X11/xkb/rules/base.lst, there should be some rule to change the menu key behaviour as well.
Or, launch xev from the terminal, press the menu key and look at the terminal. You should see a lot of output, and something like

KeyRelease event, serial 34, synthetic NO, window 0x5e00001,
    root 0xaa, subw 0x0, time 9644020, (689,-91), root:(691,302),
    state 0x0, keycode 135 (keysym 0xff67, Menu), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

Add then your keycode (135 in my case) to the Menu keysym

$ xmodmap -e "keycode 135 = Menu"

and see if keysym Menu = Super_R and !add Super = Super_R work. If so, add the line keycode 135 = Menu to your .Xmodmap, making sure it's loaded at OB startup!

Last edited by hermes (2011-06-08 11:10:24)


Linux Registered User #362737

Offline

#3 2011-06-08 14:50:04

ERiS
Member
Registered: 2011-03-15
Posts: 20

Re: Disable Caps Lock & remap Menu to Super_R with xmodmap no longer works

Hmm. Impressed. Everything worked beautifully, thanks! I'd tried caps:none before, but I'm not sure exactly what happened then.

Didn't think I'd have to add the keycode for Menu key, since it WAS working as a Menu key. Logic fault on my part, ha!
For Menu to behave as Super_R, you just need:
xmodmap -e "keycode 135 = Menu"
and,
xmodmap -e "keysym Menu = Super_R"

The last part, !add Super = Super_R doesn't seem to be necessary anymore.

Thank you for the help!

Offline

#4 2011-06-08 18:57:01

hermes
Member
From: Lucca, Italy
Registered: 2010-05-19
Posts: 99

Re: Disable Caps Lock & remap Menu to Super_R with xmodmap no longer works

ERiS wrote:

I'd tried caps:none before, but I'm not sure exactly what happened then.

What do you mean?

ERiS wrote:

Didn't think I'd have to add the keycode for Menu key, since it WAS working as a Menu key. Logic fault on my part, ha!

The error message itself said it missed a keycode:

xmodmap:  /home/eris/.xmodmap:2:  bad keysym target keysym 'Menu', no corresponding keycodes

That's why I thought you should have better added the keycode...

ERiS wrote:

The last part, !add Super = Super_R doesn't seem to be necessary anymore.

It's a comment, I missed the exclamation point... You actually never needed it!

ERiS wrote:

Thank you for the help!

You're welcome smile


Linux Registered User #362737

Offline

Board footer

Powered by FluxBB