Monday, 3 December 2012

What key am I pressing? oops!

As the proud owner of a blank key caps keyboard (and not just any keyboard!) there are times when I need to remap certain keys.

One of my Kinesis Advantage with blank key caps

Having moved recently to archlinux with i3 as my window manager I no longer have graphical keyboard settings tools installed.

xev to the rescue!

xev is a command line tool that prints the contents of events in the X Window System:

KeyPress event, serial 54, synthetic NO, window 0x1a00001,
    root 0x289, subw 0x0, time 2834169, (-425,551), root:(539,599),
    state 0x0, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 54, synthetic NO, window 0x1a00001,
    root 0x289, subw 0x0, time 2834272, (-425,551), root:(539,599),
    state 0x4, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 54, synthetic NO, window 0x1a00001,
    root 0x289, subw 0x0, time 2834682, (-425,551), root:(539,599),
    state 0x0, keycode 47 (keysym 0x3b, semicolon), same_screen YES,
    XLookupString gives 1 bytes: (3b) ";"
    XmbLookupString gives 1 bytes: (3b) ";"
    XFilterEvent returns: False

KeyRelease event, serial 54, synthetic NO, window 0x1a00001,
    root 0x289, subw 0x0, time 2834777, (-425,551), root:(539,599),
    state 0x0, keycode 47 (keysym 0x3b, semicolon), same_screen YES,
    XLookupString gives 1 bytes: (3b) ";"
    XFilterEvent returns: False

KeyPress event, serial 54, synthetic NO, window 0x1a00001,
    root 0x289, subw 0x0, time 2838923, (-425,551), root:(539,599),
    state 0x0, keycode 62 (keysym 0xffe2, Shift_R), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 54, synthetic NO, window 0x1a00001,
    root 0x289, subw 0x0, time 2838994, (-425,551), root:(539,599),
    state 0x1, keycode 62 (keysym 0xffe2, Shift_R), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

MotionNotify event, serial 32, synthetic NO, window 0x1e00001,
    root 0x289, subw 0x0, time 8794435, (20,392), root:(1304,440),
    state 0x0, is_hint 0, same_screen YES

MotionNotify event, serial 32, synthetic NO, window 0x1e00001,
    root 0x289, subw 0x0, time 8794447, (1,393), root:(1285,441),
    state 0x0, is_hint 0, same_screen YES

LeaveNotify event, serial 32, synthetic NO, window 0x1e00001,
    root 0x289, subw 0x0, time 8794458, (-16,393), root:(1268,441),
    mode NotifyNormal, detail NotifyNonlinear, same_screen YES,
    focus YES, state 0

KeyPress event, serial 32, synthetic NO, window 0x1e00001,
    root 0x289, subw 0x0, time 8795156, (-83,393), root:(1201,441),
    state 0x0, keycode 42 (keysym 0x67, g), same_screen YES,
    XLookupString gives 1 bytes: (67) "g"
    XmbLookupString gives 1 bytes: (67) "g"
    XFilterEvent returns: False

KeyRelease event, serial 32, synthetic NO, window 0x1e00001,
    root 0x289, subw 0x0, time 8795235, (-83,393), root:(1201,441),
    state 0x0, keycode 42 (keysym 0x67, g), same_screen YES,
    XLookupString gives 1 bytes: (67) "g"
    XFilterEvent returns: False

The interesting lines are the ones with the keycode and symbol:

...
state 0x0, keycode 62 (keysym 0xffe2, Shift_R), same_screen YES,
...

No more blind key remaps :)

4 comments:

  1. Lucky Club | Online Casino | Lucky Club
    Lucky Club is a popular online casino owned and operated by the Loto-based Gambling Authority under licence number G4535 (formerly G2021). It provides a wide range luckyclub of casino games

    ReplyDelete
  2. Nevertheless, American Roulette stays very fashionable nevertheless European Roulette and French Roulette are the most well-liked among players. These roulette variants offer higher winning odds than American Roulette end result of|as a result of} they include only the one zero. Online roulette sitesvying on your consideration, however only a 카지노 사이트 추천 select few deserve your hard-earned cash. We hope our mini-reviews helped you select the best roulette site on your betting preferences.

    ReplyDelete
  3. Big Fish Games did not make anyone obtainable for an interview, nor did the company reply to detailed questions. The firm has said in earlier courtroom filings that solely a fraction of the sport's gamers actually spend money. At the end of the yr the web playing trade was estimated to be worth $41.4bn. All types of playing became constrained to the racetrack because of of} a regulation that restricted public video games of playing cards with money at stake. This spurred the ‘brick and mortar’ bookies to open up the market to different sports as a 더온카지노 substitute of just the races.

    ReplyDelete
  4. In cooperation with League of Legends, Infinity Studio presents a 3D photograph frame of The Lady of Luminosity - Lux! Luxanna Crownguard, raised within the metropolis of Demacia, had at all times saved her magical abilities secret to keep away from suspicion. However, the optimistic and highly effective Lux finally embraced her abilities, studying to protect her homeland in secret. Please select a rustic or region to customise the content material in your location. How To Coat a Flower With ResinWatch as Jara coats a silk flower with XTC-3D epoxy resin to create a long-lasting glossy show. An advanced undo/redo system ensures you can to|you possibly can} at all times return, and the pioneering undo tree means have the ability to|you possibly can} Toilet Papers at all times go ahead, even the place other packages lose the power to redo.

    ReplyDelete