- int Length;
- char theKeyBuffer[ AVAIL_KEYBUF + 1 ];
- int theKeyBufferMaxLen = AVAIL_KEYBUF;
- KeySym theKeySym;
- XComposeStatus theComposeStatus;
-
- Length = XLookupString( theKeyEvent,
- theKeyBuffer, theKeyBufferMaxLen,
- &theKeySym, &theComposeStatus );
-
- if ( Length > 0 ) {
- switch ( theKeyBuffer[ 0 ] ) {
- case 'q':
- case 'Q':
- if ( theKeyEvent->state & XCBModMask1 ) { /* META (Alt) %-!< */
- ReturnState = False;
- }
- break;
- default:
- break;
- }
- }
-#else
- /* quit on any key */
- Bool ReturnState = False;
-#endif
+ /* quit on Meta-Q (Alt-Q) */
+ XCBKEYSYM theKeySym;
+
+ /* last param is "int col". What? add enumeration to xcb_keysyms.h */
+ theKeySym = XCBKeyPressLookupKeysym( theKeySyms, theKeyEvent, 1 );