mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
Merge pull request #89 from m1k1o/master
BUG: XKeysymToKeycode returns zero
This commit is contained in:
commit
ca0b5b2d35
@ -97,8 +97,11 @@ void XButton(unsigned int button, int down) {
|
|||||||
void XKey(unsigned long key, int down) {
|
void XKey(unsigned long key, int down) {
|
||||||
Display *display = getXDisplay();
|
Display *display = getXDisplay();
|
||||||
KeyCode code = XKeysymToKeycode(display, key);
|
KeyCode code = XKeysymToKeycode(display, key);
|
||||||
|
|
||||||
|
if (code != 0) {
|
||||||
XTestFakeKeyEvent(display, code, down, CurrentTime);
|
XTestFakeKeyEvent(display, code, down, CurrentTime);
|
||||||
XSync(display, 0);
|
XSync(display, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void XClipboardSet(char *src) {
|
void XClipboardSet(char *src) {
|
||||||
|
Loading…
Reference in New Issue
Block a user