Making Caps-Lock a Control key on Adesso keyboards

Gautam Iyer gi1242+xorg at cmu.edu
Thu Aug 27 17:57:14 PDT 2009


Hi All,

I just bought a new Adesso keyboard, and found that I am unable to make
caps lock a control key.

Usually I just do

    setxkbmap -option ctrl:swapcaps

or alternately use xmodmap, and swap control and caps lock on all my
keyboards. However this doesn't quite work on my new Adesso keyboard.
The left control works as caps lock just fine. But the caps lock does
not work as control. 

    KeyPress event, serial 31, synthetic NO, window 0x1100001,
        root 0x1f0, subw 0x0, time 2428520, (121,111), root:(2470,722),
        state 0x0, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
        XLookupString gives 0 bytes:
        XmbLookupString gives 0 bytes:
        XFilterEvent returns: False

    KeyPress event, serial 31, synthetic NO, window 0x1100001,
        root 0x1f0, subw 0x0, time 2430328, (121,111), root:(2470,722),
       state 0x4, keycode 54 (keysym 0x63, c), same_screen YES,
        XLookupString gives 1 bytes: (03) ""
        XmbLookupString gives 1 bytes: (03) ""
        XFilterEvent returns: False

    KeyRelease event, serial 31, synthetic NO, window 0x1100001,
        root 0x1f0, subw 0x0, time 2430384, (121,111), root:(2470,722),
        state 0x4, keycode 54 (keysym 0x63, c), same_screen YES,
        XLookupString gives 1 bytes: (03) ""

    KeyRelease event, serial 31, synthetic NO, window 0x1100001,
        root 0x1f0, subw 0x0, time 2432808, (121,111), root:(2470,722),
        state 0x4, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
        XLookupString gives 0 bytes:

Now with my control/caps lock switched, pressing Caps-Lock+c gives

    KeyPress event, serial 31, synthetic NO, window 0x1100001,
	root 0x1f0, subw 0x0, time 2435112, (121,111), root:(2470,722),
	state 0x0, keycode 66 (keysym 0xffe3, Control_L), same_screen YES,
	XKeysymToKeycode returns keycode: 37
	XLookupString gives 0 bytes:
	XmbLookupString gives 0 bytes:
	XFilterEvent returns: False

    KeyRelease event, serial 31, synthetic NO, window 0x1100001,
	root 0x1f0, subw 0x0, time 2435936, (121,111), root:(2470,722),
	state 0x4, keycode 66 (keysym 0xffe3, Control_L), same_screen YES,
	XKeysymToKeycode returns keycode: 37
	XLookupString gives 0 bytes:

    KeyPress event, serial 31, synthetic NO, window 0x1100001,
	root 0x1f0, subw 0x0, time 2435936, (121,111), root:(2470,722),
	state 0x0, keycode 54 (keysym 0x63, c), same_screen YES,
	XLookupString gives 1 bytes: (63) "c"
	XmbLookupString gives 1 bytes: (63) "c"
	XFilterEvent returns: False

    KeyRelease event, serial 31, synthetic NO, window 0x1100001,
	root 0x1f0, subw 0x0, time 2436008, (121,111), root:(2470,722),
	state 0x0, keycode 54 (keysym 0x63, c), same_screen YES,
	XLookupString gives 1 bytes: (63) "c"

Notice that as soon as I press "c" (while holding down caps-lock), a
Control_L key release event is generated *before* the keypress event for
my key "c". After that the keypress event for "c" is generated with
state 0.

Does anyone know what I can do? I've temporarily turned on sticky
modifiers to solve the problem, but I don't like that. I'd like to have
my control/caps swapped on my new Adesso keyboard.

Is there some secret option I can pass to set xkbmap to make everything
work...?

Thanks,

GI

-- 
100 THINGS I'D DO IF I EVER BECAME AN EVIL OVERLORD
13. All slain enemies will be cremated, or at least have several rounds
of ammunition emptied into them, not left for dead at the bottom of the
cliff. The announcement of their deaths, as well as any accompanying
celebration, will be deferred until after the aforementioned disposal.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20090827/16d18000/attachment.pgp>


More information about the xorg mailing list