[ltp] Ultranav USB keyboard - how to disable the page-left and page-right buttons?

Richard Neill linux-thinkpad@linux-thinkpad.org
Wed, 21 May 2008 23:50:53 +0100


Dear All,

I've just bought a new external USB ultranav keyboard for my desktop (I
like the trackpoint so much!), and it has page-left/page-right buttons
just above the arrow keys.

On my thinkpad, these emit distinct keycodes, and therefore it's very
easy to ignore them. However, the USB Ultranav keyboard seems to
synthesise "Left_Alt + LEFT_ARROW" and "Left_Alt + RIGHT_ARROW" in
hardware. This means that when I'm scrolling up, and I miss-hit a key,
it gets interpreted as Back/Forward. Obviously, this is a total
nuisance, leading to data-loss instead of scrolling.

Before I physically destroy the switch mechanisms (which is what I had
to do last time), does anyone have a better suggestion?

Here's the output of xev:


#(1)This is what happens when I press the left-arrow key

KeyPress event, serial 31, synthetic NO, window 0x6c00001,
    root 0x186, subw 0x0, time 224225693, (876,687), root:(879,715),
    state 0x0, keycode 100 (keysym 0xff51, Left), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 31, synthetic NO, window 0x6c00001,
    root 0x186, subw 0x0, time 224225789, (876,687), root:(879,715),
    state 0x0, keycode 100 (keysym 0xff51, Left), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False



#(2)This is what happens when I press the page-left key:

KeyPress event, serial 31, synthetic NO, window 0x6c00001,
    root 0x186, subw 0x0, time 224227245, (876,687), root:(879,715),
    state 0x0, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyPress event, serial 31, synthetic NO, window 0x6c00001,
    root 0x186, subw 0x0, time 224227245, (876,687), root:(879,715),
    state 0x8, keycode 100 (keysym 0xff51, Left), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 31, synthetic NO, window 0x6c00001,
    root 0x186, subw 0x0, time 224227342, (876,687), root:(879,715),
    state 0x8, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 31, synthetic NO, window 0x6c00001,
    root 0x186, subw 0x0, time 224227342, (876,687), root:(879,715),
    state 0x0, keycode 100 (keysym 0xff51, Left), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False


#(3)This is what happens when I press Left_Alt + Left-Arrow

KeyPress event, serial 31, synthetic NO, window 0x6c00001,
    root 0x186, subw 0x0, time 229191706, (91,78), root:(94,106),
    state 0x0, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyPress event, serial 31, synthetic NO, window 0x6c00001,
    root 0x186, subw 0x0, time 229192330, (91,78), root:(94,106),
    state 0x8, keycode 100 (keysym 0xff51, Left), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 31, synthetic NO, window 0x6c00001,
    root 0x186, subw 0x0, time 229192394, (91,78), root:(94,106),
    state 0x8, keycode 100 (keysym 0xff51, Left), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 31, synthetic NO, window 0x6c00001,
    root 0x186, subw 0x0, time 229193002, (91,78), root:(94,106),
    state 0x8, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False



There is a slight difference: the real keypress combination is
  Left_Alt pressed
  Left-arrow pressed
  Left-arrow released
  Left-Alt released

Whereas the spurious fake keypresses are:
  Left_Alt pressed
  Left-arrow pressed
  Left-Alt released
  Left-arrow released;


Thanks very much for your help,

Richard