Swapping Menu and Ctrl (possible xmodmap bug)

Ulf Magnusson ulfalizer at gmail.com
Sat May 28 15:14:31 PDT 2005


I'm trying to swap the left control key for the Menu key on my Windows
keyboard. I'm using the "se" symbol map, residing in the
{xkb-base}/symbols/pc/ directory.

I took a first stab at the problem by modifying the /symbols/pc/pc
file (I have no idea why it gets used, as it isn't included directly
or indirectly from the "se" file, but a quick grep led me there),
changing the   key <MENU> { [ Menu ] };   entry to   key <MENU> { [
Control_L ] };   and moving it before the line   modifier_map Control{
Control_L, Control_R };   . After that the key would generate the
correct keysym, but wouldn't function as a control key. I noticed that
xev reported "state 0x0" for the wanna-be-ctrl Menu key and "state
0x4" for the real, working ctrl.

I took a second stab at the problem with the following xmodmap script:

# 117 is the scan code for my Menu key
keysym 117 = Control_L
add Control = Control_L

That seemed to do the trick at first, but after a while I noticed that
my U key would no longer function, for some wierd reason generating
the keysym Control_L. Is this a bug in xmodmap?

I'm running out of ideas. What's the good way to swap the two keys?

Ulf

X Window System Version 6.8.2
Release Date: 9 February 2005
X Protocol Version 11, Revision 0, Release 6.8.2
Build Operating System: FreeBSD 5.4 i386 [ELF] 
Current Operating System: FreeBSD obygden 5.4-RELEASE FreeBSD
5.4-RELEASE #0: Wed May 11 17:32:06 CEST 2005    
ulf at obygden:/usr/obj/usr/src/sys/DEB i386
Build Date: 21 May 2005
        Before reporting problems, check http://wiki.X.Org
        to make sure that you have the latest version.
Module Loader present



More information about the xorg mailing list