[Wylug-help] X Keyboard Oddness

Jason Lander jason at env.leeds.ac.uk
Mon, 17 Mar 2003 14:29:58 +0000 (GMT)


James,

I still don't quite understand what you are trying to do...

Are you saying there is an extra key with an `@' on it that you would like
this to actually deliver the `@' character?

If so, I think you can use xmodmap to map this `keycode' of this key to
the `keysym' for an `@'.

You can use

   xev

to get the keycode. If you start xev, and ensure that it has
keyboard focus and that you can see what is is sending to stdout, you can
then press your @-key and xev will report KeyPress event with the
keycode attached:

 KeyPress event, serial 21, synthetic NO, window 0x1800001,
     root 0x2a, subw 0x0, time 4233827063, (114,44), root:(141,52),
     state 0x0, keycode 49 (keysym 0x60, grave), same_screen YES,
     XLookupString gives 1 characters:  "`"

Assuming the keycode is 49 - which happens to belong to the backquote (aka
grave) key on the keyboard I'm using - then the remap command would be:

  xmodmap -e "keycode 49 = at"

> I was hoping there was just an option to turn on in the keyboard section
> of XF86Config. It works find at the console, though.

I'm not sure if there is any relationship between how the Linux console
handles keypresses and how X does.

- Jason