mirror of
https://github.com/m1k1o/neko.git
synced 2025-08-01 07:49:53 +02:00
test if XKeysymToKeycode returns zero
This commit is contained in:
parent
5b23448144
commit
19c6b8c4ae
1 changed files with 5 additions and 2 deletions
|
@ -97,8 +97,11 @@ void XButton(unsigned int button, int down) {
|
|||
void XKey(unsigned long key, int down) {
|
||||
Display *display = getXDisplay();
|
||||
KeyCode code = XKeysymToKeycode(display, key);
|
||||
XTestFakeKeyEvent(display, code, down, CurrentTime);
|
||||
XSync(display, 0);
|
||||
|
||||
if (code != 0) {
|
||||
XTestFakeKeyEvent(display, code, down, CurrentTime);
|
||||
XSync(display, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void XClipboardSet(char *src) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue