[Xquartz-dev] Modifier key presses?

Derek Fawcus dfawcus at cisco.com
Wed Dec 5 15:39:08 PST 2007


I seem to recall someone mentioning that it is not possible to see
the actual press and release of modifiers,  and as such one has to
infer the presses from the changes to modifer flags.

However I knocked up a simple app while working on something else,
which is currently just looking at key press/release,  button press/release,
and modifer changes.

It sees a keycode with each modifier change.  Filtered output below:

Flag Chg 0x00020102;56; Shft LShft
Flag Chg 0x00000100;56;
Flag Chg 0x00020104;60; Shft RShft
Flag Chg 0x00000100;60;
Flag Chg 0x00100108;55; Cmd LCmd
Flag Chg 0x00000100;55;
Flag Chg 0x00100110;54; Cmd RCmd
Flag Chg 0x00000100;54;

That is on my macbook (running tiger) for press and release in sequence of:
  left shift (key code 56)
  right shift (key code 60)
  left command (key code 55)
  right command (key code 54)

DF


More information about the Xquartz-dev mailing list