mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
more cleanup
This commit is contained in:
parent
82062637ae
commit
1038dd109a
@ -126,9 +126,9 @@ KeyCode XkbKeysymToKeycode(KeySym keysym) {
|
|||||||
return keycode;
|
return keycode;
|
||||||
}
|
}
|
||||||
|
|
||||||
int XKey(unsigned long key, int down) {
|
void XKey(unsigned long key, int down) {
|
||||||
Display *display = getXDisplay();
|
Display *display = getXDisplay();
|
||||||
KeyCode code = -2;
|
KeyCode code = 0;
|
||||||
|
|
||||||
code = XkbKeysymToKeycode(key);
|
code = XkbKeysymToKeycode(key);
|
||||||
if (!code) {
|
if (!code) {
|
||||||
@ -142,7 +142,7 @@ int XKey(unsigned long key, int down) {
|
|||||||
XChangeKeyboardMapping(display, code, numcodes, keysym_list, 1);
|
XChangeKeyboardMapping(display, code, numcodes, keysym_list, 1);
|
||||||
}
|
}
|
||||||
if (!code)
|
if (!code)
|
||||||
return -1;
|
return;
|
||||||
XTestFakeKeyEvent(display, code, down, CurrentTime);
|
XTestFakeKeyEvent(display, code, down, CurrentTime);
|
||||||
XSync(display, 0);
|
XSync(display, 0);
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
void XMove(int x, int y);
|
void XMove(int x, int y);
|
||||||
void XScroll(int x, int y);
|
void XScroll(int x, int y);
|
||||||
void XButton(unsigned int button, int down);
|
void XButton(unsigned int button, int down);
|
||||||
int XKey(unsigned long key, int down);
|
void XKey(unsigned long key, int down);
|
||||||
|
|
||||||
void XClipboardSet(char *src);
|
void XClipboardSet(char *src);
|
||||||
char *XClipboardGet();
|
char *XClipboardGet();
|
||||||
|
Loading…
Reference in New Issue
Block a user