Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
xmodmap not erasing caps lock in recent rebuild
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Ulmo
n00b
n00b


Joined: 18 Feb 2006
Posts: 6

PostPosted: Sat Dec 25, 2010 11:25 pm    Post subject: xmodmap not erasing caps lock in recent rebuild Reply with quote

Hi, I have recently upgraded a bunch of stuff on my Gentoo system. I did a total system rebuild ("re-emerge everything" although I actually use Paludis). I also just recently upgraded kernels.

Here's what I have currently:

Linux kernel 2.6.26.2
x11-base/xorg-x11-7.4-r1
x11-apps/xmodmap-1.0.4
sys-apps/hal-0.5.14-r3
sys-apps/dbus-1.2.24
sys-fs/udev-151-r4

What happens is that I use my .xmodmap as before, but when I do this:

clear lock
clear control
clear mod1
clear mod3
clear mod4
clear mod5
keycode 66 = Control_L
keycode 113 = Left
keycode 111 = Up
keycode 116 = Down
keycode 114 = Right
keycode 118 = Insert
keycode 110 = Home
keycode 112 = Prior
keycode 119 = Delete
keycode 115 = End
keycode 117 = Next
keycode 107 = Menu
keycode 78 = Meta_R
keycode 127 = Caps_Lock
keycode 37 = Alt_L
keycode 133 = Meta_L
keycode 64 = Super_L
keycode 108 = Super_R
keycode 134 = Hyper_R
keycode 135 = Menu
keycode 105 = Multi_key
add Lock = Caps_Lock
add Control = Control_L
add Control = Control_R
add mod1 = Alt_L
add mod1 = Alt_R
add mod3 = Meta_L
add mod3 = Meta_R
add mod4 = Super_L
add mod4 = Super_R
add mod5 = Hyper_L
add mod5 = Hyper_R

the Caps Lock key stays the same.

I found a thread where they suggested doing "setxkbmap -option caps:escape", but it causes all sorts of problems like Caps Lock giving Escape and down-arrow with a Return after it. I run "xmodmap ~/.xmodmap" (the above list), which fixes the Caps_Lock, but many problems remain like Down Arrow adds a Return to the end of the down, making that key useless.

I upgraded hald since I was having trouble with my mouse not being recognized at all (I never tested the keyboard since I couldn't point at the xterm to focus and was focused on fixing the mouse first). After a bunch of restarts and playing around, at least the mouse is working again.

Prettymuch everything about this system total-rebuild has been pretty smooth. That's usually the way with total re-builds: you're not trying to shoe-horn new stuff into old stuff, so it goes a lot smoother. This is just one of those weird outcomes of upgrading the kernel which required a newer nvidia-drivers. I upgraded nvidia-drivers to a new version too, since the older version wouldn't build any more. That's when the hald error from xorg happened, so I upgraded hald. Now, I'm having trouble with the keyboard.

The system is unusable if Caps Lock on the keyboard is actually Caps Lock, so this must be fixed. Right now, at least that is OK, but down arrow is gone.

Anybody know how to fix this, or how setkxbmap works? I don't mind remapping every single key if necessary, but someone needs to point me the way on how to do that. No one seems to know anything about xkbmap, since we were all used to xmodmap.
Back to top
View user's profile Send private message
Ulmo
n00b
n00b


Joined: 18 Feb 2006
Posts: 6

PostPosted: Mon Dec 27, 2010 3:38 am    Post subject: Re: xmodmap not erasing caps lock in recent rebuild Reply with quote

Our house is having circuit overload trouble, so I get an opportunity to restart my X server too often. This last time, nothing changed: the down arrow is still getting an extra return after it making it almost useless. Anybody know how to fix this?
Back to top
View user's profile Send private message
xavier10
Guru
Guru


Joined: 19 Jan 2004
Posts: 450
Location: Paris, France

PostPosted: Fri Jan 07, 2011 9:24 pm    Post subject: Reply with quote

It seems I have the same issue now.

I am using a netbook and have a French keyboard. I had a key bound to "Alt_Gr", that will not do the "Alt_Gr" action anymore, even when I put the right line in the .xmodmap file, even though xev claims my binding was performed well. I suspect the x server to have changed somewhat, but do not know what to do. This is really painful, and I will have to investigate, but no way I find time tonight. :(
What a mess! Basically, the key now gives a new line. Very frustrating.
Back to top
View user's profile Send private message
xavier10
Guru
Guru


Joined: 19 Jan 2004
Posts: 450
Location: Paris, France

PostPosted: Fri Jan 07, 2011 10:03 pm    Post subject: Reply with quote

For the records, I see it is also possible to tune the keyboard layout directly with evdev using the setxkbmap. Looks great. But turns out NOT great.

Problem, whatever the new layout I use (I tried all "fr" layouts plus a few others) will turn the "down key" into an "enter key".

I am puzzled.
How should one deal with keyboard config today ? I am really asking. I am used to fixing whatever needs be fixed with xmodmap (using information found with xev), but my current system will not let me do this anymore :
- xev info deos not correspond to my observation as far as modifiers keys go ;
- setxkbmap seems to be able to do only stupid things.

Any advice will be welcome.
Back to top
View user's profile Send private message
doppelganger
Tux's lil' helper
Tux's lil' helper


Joined: 30 Jun 2004
Posts: 84

PostPosted: Thu Feb 17, 2011 4:26 am    Post subject: Reply with quote

I am having the same issue. Does anyone have a clue as to what's going on with this? Checking xev it shows caps lock as acutally keycode 66 and "Caps_Lock", which seems correct. xmodemap seems to run find, but caps_lock keeps operating as caps lock

i've tried using setxkbmap but all that does is allow me to remove caplock, but when I remap it with xmodmap nothing is fixed, so right now there is not solution for me
Back to top
View user's profile Send private message
doppelganger
Tux's lil' helper
Tux's lil' helper


Joined: 30 Jun 2004
Posts: 84

PostPosted: Thu Feb 17, 2011 1:35 pm    Post subject: Reply with quote

Ok, so I've been looking at what was updated when this broke. here's a list of all the packages that were updated. I have since reverted back to the previous version of the xkeyboard-config and evdev. doing this didn't help at all. same issue. are there any other packages in this list that would affect Caps_Lock and xmodmap? I'm currently running version 1.0.5 of xmodmap, which has not been updated since the system was built.

I have not downgraded xorg-server, but i'm wondering if there is a potential that could have caused this?


Code:

app-admin/eselect-opengl-1.2.1
app-arch/sharutils-4.10
app-cdr/k3b-2.0.2-r1
app-crypt/mit-krb5-1.8.3-r3
app-office/libreoffice-bin-3.3.0-r1
dev-libs/libxml2-2.7.8
dev-libs/lzo-2.04
dev-python/dbus-python-0.83.2
media-libs/gst-plugins-ugly-0.10.16
media-libs/mesa-7.9.1
media-plugins/gst-plugins-a52dec-0.10.16
media-plugins/gst-plugins-dvdread-0.10.16
media-plugins/gst-plugins-lame-0.10.16
media-plugins/gst-plugins-mad-0.10.16
media-plugins/gst-plugins-mpeg2dec-0.10.16
media-sound/jack-audio-connection-kit-0.109.2-r1
net-im/pidgin-2.7.10
net-misc/openssh-5.8_p1
net-misc/whois-5.0.8
net-wireless/bluez-4.82
www-plugins/adobe-flash-10.2.152.27
x11-apps/mesa-progs-8.0.1
x11-apps/xinit-1.3.0-r2
x11-apps/xrdb-1.0.8
x11-base/xorg-server-1.9.4
x11-drivers/ati-drivers-10.12
x11-drivers/radeon-ucode-20110106
x11-drivers/xf86-input-evdev-2.6.0
x11-drivers/xf86-video-ati-6.14.0
x11-libs/cairo-1.10.2-r1
x11-libs/libX11-1.4.1
x11-libs/libXaw-1.0.9
x11-libs/libXi-1.4.1
x11-libs/libXp-1.0.1
x11-libs/libdrm-2.4.23
x11-libs/libpciaccess-0.12.1
x11-libs/pixman-0.20.2
x11-misc/xbitmaps-1.1.1
x11-misc/xkeyboard-config-2.1
x11-proto/printproto-1.0.5
x11-proto/resourceproto-1.1.1
x11-proto/xf86driproto-2.1.1
x11-proto/xf86vidmodeproto-2.3.1
x11-proto/xineramaproto-1.2.1
x11-proto/xproto-7.0.20
x11-terms/xterm-267
Back to top
View user's profile Send private message
albright
Advocate
Advocate


Joined: 16 Nov 2003
Posts: 2559
Location: Near Toronto

PostPosted: Mon Feb 21, 2011 2:30 pm    Post subject: Reply with quote

has anyone figured out what's going on here, and
how to get xmodmap to work with recent xorg-server
(or whatever else is causing this problem)?
_________________
.... there is nothing - absolutely nothing - half so much worth
doing as simply messing about with Linux ...
(apologies to Kenneth Graeme)
Back to top
View user's profile Send private message
xavier10
Guru
Guru


Joined: 19 Jan 2004
Posts: 450
Location: Paris, France

PostPosted: Mon Feb 21, 2011 5:04 pm    Post subject: Reply with quote

Hi, sorry I was not monitoring this thread carefully.

I went through quite a bit of pain with this, and eventually found a solution that mostly solves it for me:
- kill hal completely;
- re emerge whatever package was assuming it (with emerge -aevDN world or something like that);
- reconfigure Xorg, with a special section for the keyboard (code below);
- do some xmodmap (yes, it was working fine at that point), to prevent some keys from sending two symbols (!).
I hope I did not forget anything...
Back to top
View user's profile Send private message
xavier10
Guru
Guru


Joined: 19 Jan 2004
Posts: 450
Location: Paris, France

PostPosted: Mon Feb 21, 2011 5:06 pm    Post subject: Reply with quote

The keyboard entry (actually in /etc/X11/xorg.conf.d/01.keyboard):

Code:

Section "InputClass"
    Identifier          "keyboard"
    MatchIsKeyboard     "on"
    Driver              "evdev"
    Option              "XkbModel" "asus_laptop"
    Option              "XkbLayout" "fr"
    Option              "XkbOptions" "lv5:rwin_switch_lock,terminate:ctrl_alt_bksp"
EndSection
Back to top
View user's profile Send private message
albright
Advocate
Advocate


Joined: 16 Nov 2003
Posts: 2559
Location: Near Toronto

PostPosted: Mon Feb 21, 2011 6:03 pm    Post subject: Reply with quote

thanks, but at the moment I want to know why xmodmap has
stopped working.

If I give the command xmodmap, here's the output
Code:
lock        Caps_Lock (0x42)
control     Control_L (0x25),  Control_R (0x69)
mod1        Alt_L (0x40),  Alt_R (0x6c),  Meta_L (0xcd)
mod2        Num_Lock (0x4d)
mod3     
mod4        Super_L (0x85),  Super_R (0x86),  Super_L (0xce),  Hyper_L (0xcf)
mod5        ISO_Level3_Shift (0x5c),  Mode_switch (0xcb)


If I then try
Code:
xmodmap -e "remove lock = Caps_Lock"


then sure enough Caps_Lock is removed from the xmodmap list.

BUT the caps lock key still locks the caps. I get the same phenomenon with
all the functions. I can remove the shift keys, but they still shift.

It's sad that the old linux/unix tools that worked so well are being eliminated
in favour of opaque and complex "don't let the user touch" environments.

I kind of thought linux might not go that route but ...
_________________
.... there is nothing - absolutely nothing - half so much worth
doing as simply messing about with Linux ...
(apologies to Kenneth Graeme)
Back to top
View user's profile Send private message
xavier10
Guru
Guru


Joined: 19 Jan 2004
Posts: 450
Location: Paris, France

PostPosted: Mon Feb 21, 2011 6:24 pm    Post subject: Reply with quote

I am not sure I understood what improved my situation; right now my assumption was that the unclean removal of hal caused my xorg configuration to be messed up, and that the failure of xmodmap to produce the desired effect was an indirect consequence of this (.

This is only an assumption though. What I meant to say is that, somehow, I recovered xmodmap in the process.

Anyway, I tend to agree with you that good old configuration tools should not be given up for solutions that hide more from the user, and prevent configuration. I was frustrated when the Xorg configuration process changed to hal and then away from it, but now I seem to feel better back to the xorg configuration. I hope we are done for a while now.
Back to top
View user's profile Send private message
albright
Advocate
Advocate


Joined: 16 Nov 2003
Posts: 2559
Location: Near Toronto

PostPosted: Mon Feb 21, 2011 9:12 pm    Post subject: Reply with quote

I tried reemerging with no hal use flag but that
did not bring back xmodmap functionality :(


Edit: I see that kde has a section in the keyboard settings
which lets you disable the caps lock key (I suspect that this
is where my problem resides - KDE taking over total control of
the keyboard).

Of course, once KDE disables the caps lock key you cannot
remap it onto something useful :?

Oops - spoke too soon. It is possible to use kde to disable the
caps lock and then use xbindkeys to re-assign that key (in my
case to open konsole).

OK - so I'm fairly happy
_________________
.... there is nothing - absolutely nothing - half so much worth
doing as simply messing about with Linux ...
(apologies to Kenneth Graeme)
Back to top
View user's profile Send private message
xavier10
Guru
Guru


Joined: 19 Jan 2004
Posts: 450
Location: Paris, France

PostPosted: Mon Feb 21, 2011 9:19 pm    Post subject: Reply with quote

Ah, ok, I see. If that is relevant, I am using xfce, so I did not observe that at least.
Back to top
View user's profile Send private message
onefriedrice
n00b
n00b


Joined: 26 Aug 2007
Posts: 57

PostPosted: Mon Feb 28, 2011 10:16 pm    Post subject: Re: xmodmap not erasing caps lock in recent rebuild Reply with quote

I don't know what the deal is, but xmodmap recently stopped being able to disable the capslock for me, too, using Fluxbox. I don't like my capslock key remapped; I just like it dead. Fortunately there is an equivalent setxkbmap command that still works.

Ulmo wrote:
Anybody know how to fix this, or how setkxbmap works? I don't mind remapping every single key if necessary, but someone needs to point me the way on how to do that. No one seems to know anything about xkbmap, since we were all used to xmodmap.


I am not seeing any strange behavior with the down arrow-key or anything else using caps:escape, but if you just want to disable the capslock, the correct option is ctrl:nocaps.

i.e.: setxkbmap -option ctrl:nocaps
Back to top
View user's profile Send private message
kvigor
n00b
n00b


Joined: 01 Mar 2011
Posts: 1

PostPosted: Tue Mar 01, 2011 3:13 pm    Post subject: Reply with quote

I wrestled this recently and found the magic was using xmodmap's 'keysym' command to remap capslock instead of reassigning it as a modifier key.

So, for example, this does *not* work:

Code:

remove Lock = Caps_Lock
add mod4 = Caps_Lock


but this does:

Code:

remove Lock = Caps_Lock
remove mod4 = Super_L
keysym Caps_Lock = Super_L
add mod4 = Super_L


The first used to work until quite recently; I have no idea what changed to break it.
Back to top
View user's profile Send private message
doppelganger
Tux's lil' helper
Tux's lil' helper


Joined: 30 Jun 2004
Posts: 84

PostPosted: Fri Mar 04, 2011 5:58 pm    Post subject: Reply with quote

strange...now with the workaround above it appears to be a fluxbox issue.

I have xmodmap "~/.Xmodmap" in my .fluxbox startup file, but it is like it's not running it. Once in fluxbox I open a terminal and run the command manually and everything is as it should be. somehow the command isn't being run when fluxbox starts.

At least I can get it working.

Thanks for the workaround
Back to top
View user's profile Send private message
jody
Guru
Guru


Joined: 16 Oct 2007
Posts: 540
Location: Switzerland

PostPosted: Thu Jun 23, 2011 10:52 am    Post subject: Reply with quote

My xmodmap command to kill the caps lock on gnome
Code:
xmodmap -e "remove lock = Caps_Lock"
has also stopped working,
but onefriedrice's setxkbmap advice works well for me - thanks!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum