You are not logged in.

#1 2009-11-03 21:02:38

orcus
Member
Registered: 2009-05-07
Posts: 2

xinit and xmodmap not working after latest upgrades

I have a .xinitrc like:

#!/bin/bash
xmodmap /home/USER/.Xmodmaprc
exec xmonad

.Xmodmaprc:

keycode 135 = Hyper_R
add mod3 = Hyper_R

which worked fine until the latest round of X-related upgrades. Now the xmodmap effects seem to not take effect inside xmonad. (If I check xmodmap before xmonad starts, it is good, but not after). Does anyone know what is wrong / what has changed ?

Thanks
Orcus

Offline

#2 2009-11-04 00:09:05

rodyaj
Member
Registered: 2009-10-13
Posts: 54

Re: xinit and xmodmap not working after latest upgrades

My xmodmap settings have stopped working too. I usually set my Windows key to act like a normal key (Super_L) by removing the modifier. I wouldn't be surprised if xorg with hal is the culprit as I've had at least two other problems with keyboard shortcuts getting disabled this year because of them.

My .xmodmaprc:

keycode 115 = Super_L
keycode 116 = Super_L
clear Mod4

Last edited by rodyaj (2009-11-05 13:44:17)

Offline

#3 2009-11-05 06:36:26

aldld
Member
Registered: 2009-08-10
Posts: 14

Re: xinit and xmodmap not working after latest upgrades

I may be having the same problem. My .Xmodmap file contains:

remove Lock = Caps_Lock
keysym Caps_Lock = Escape

When I use:

xmodmap .Xmodmap

I get the following message:

X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  118 (X_SetModifierMapping)
  Value in failed request:  0x17
  Serial number of failed request:  12
  Current serial number in output stream:  12

Let me know if you get something similar, because it might be the same problem that I am having.

Offline

#4 2009-11-05 11:30:03

rodyaj
Member
Registered: 2009-10-13
Posts: 54

Re: xinit and xmodmap not working after latest upgrades

I'll check that error message out when I get home, but for now, you could try adding this to your .xinitrc instead:

setxkbmap -option caps:escape

Or maybe try setting by keycode rather than keysym in .Xmodmap. e.g.,

clear Lock
keycode 0x42 = Escape

(I think you'll need to use xev to find out what keycode your escape key is though.)

Offline

#5 2009-11-06 15:21:40

aldld
Member
Registered: 2009-08-10
Posts: 14

Re: xinit and xmodmap not working after latest upgrades

rodyaj wrote:

I'll check that error message out when I get home, but for now, you could try adding this to your .xinitrc instead:

setxkbmap -option caps:escape

This helped. Thanks!

rodyaj wrote:

Or maybe try setting by keycode rather than keysym in .Xmodmap. e.g.,

clear Lock
keycode 0x42 = Escape

(I think you'll need to use xev to find out what keycode your escape key is though.)

This one didn't work though. I tried removing the clear Lock line, and I don't get any errors. But then it doesn't work properly.

Offline

#6 2009-11-06 22:10:20

chpln
Member
From: Australia
Registered: 2009-09-17
Posts: 361

Re: xinit and xmodmap not working after latest upgrades

I spent quite awhile trying to find the cause of this problem.  Eventually I tracked it down to this line in my hal config:

<merge key="input.xkb.Options" type="string">ctrl:nocaps</merge>

Which seems to not only map caps lock to control, but also reset every other modifier in the process.

My solution was to remove it and just perform remapping with xmodmap:

remove lock = Caps_Lock
add control = Caps_Lock

Offline

#7 2009-11-06 23:51:36

rodyaj
Member
Registered: 2009-10-13
Posts: 54

Re: xinit and xmodmap not working after latest upgrades

Thanks for the tip on removing ctrl:nocaps. In my case I also had to make sure the keyboard layout is loaded before xmodmap in .xinitrc:

exec setxkbmap -layout gb &
exec xmodmap ~/.xmodmaprc &

Now all my xmodmap settings work.

I'm fed up of wasting my life on fixing changes to xorg and hal after updates, but I guess there isn't really much that can be done about it other than running pacman -Syu far less frequently, and checking this forum for any major issues beforehand.

Last edited by rodyaj (2009-11-07 04:18:14)

Offline

#8 2009-11-08 17:09:05

orcus
Member
Registered: 2009-05-07
Posts: 2

Re: xinit and xmodmap not working after latest upgrades

Great, it now works after setxkbmap.
Thanks.

/me wonders why it broke and why this fixes it

Offline

Board footer

Powered by FluxBB