#include #ifdef PLATFORM_POSIX #include #include #include #include #include using namespace Upp; int GetKeyCodeX(int key) { _XDisplay *dpy = XOpenDisplay(NULL); if (!dpy) return Null; if (key > 0x00ff) key = key | 0x01000000; key = XKeysymToKeycode(dpy, key); key += K_DELTA; XFlush(dpy); XCloseDisplay(dpy); return key; } #endif