mirror of
https://projects.vdr-developer.org/git/vdr-plugin-softhddevice.git
synced 2023-10-10 19:16:51 +02:00
Add modifiers to X11 remote key names.
This commit is contained in:
parent
f9998e7664
commit
2733e47af7
19
video.c
19
video.c
@ -9302,7 +9302,8 @@ static void VideoEvent(void)
|
|||||||
{
|
{
|
||||||
XEvent event;
|
XEvent event;
|
||||||
KeySym keysym;
|
KeySym keysym;
|
||||||
char buf[32];
|
const char *keynam;
|
||||||
|
char buf[64];
|
||||||
uint32_t values[1];
|
uint32_t values[1];
|
||||||
|
|
||||||
XNextEvent(XlibDisplay, &event);
|
XNextEvent(XlibDisplay, &event);
|
||||||
@ -9343,7 +9344,21 @@ static void VideoEvent(void)
|
|||||||
event.xkey.keycode);
|
event.xkey.keycode);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
FeedKeyPress("XKeySym", XKeysymToString(keysym), 0, 0);
|
keynam = XKeysymToString(keysym);
|
||||||
|
// check for key modifiers (Alt/Ctrl)
|
||||||
|
if (event.xkey.state & (Mod1Mask | ControlMask)) {
|
||||||
|
if (event.xkey.state & Mod1Mask) {
|
||||||
|
strcpy(buf, "Alt+");
|
||||||
|
} else {
|
||||||
|
buf[0] = '\0';
|
||||||
|
}
|
||||||
|
if (event.xkey.state & ControlMask) {
|
||||||
|
strcat(buf, "Ctrl+");
|
||||||
|
}
|
||||||
|
strncat(buf, keynam, sizeof(buf) - 10);
|
||||||
|
keynam = buf;
|
||||||
|
}
|
||||||
|
FeedKeyPress("XKeySym", keynam, 0, 0);
|
||||||
break;
|
break;
|
||||||
case KeyRelease:
|
case KeyRelease:
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user