//#BLITZ_PROHIBIT // Need to prohibit BLITZ for this file as Xos.h defines some nasty macros like 'index' #include #ifdef PLATFORM_POSIX #include #include #include #include #include namespace Upp { int GetKeyCodeX(int key) { _XDisplay *dpy = XOpenDisplay(NULL); if (!dpy) return Null; if (key > 0x00ff) key = key | 0x01000000; key = XKeysymToKeycode(dpy, key) + K_DELTA; XFlush(dpy); XCloseDisplay(dpy); return key; } } #endif