aboutsummaryrefslogtreecommitdiffstats
path: root/src/x11.c
diff options
context:
space:
mode:
authorfalkTX <falktx@falktx.com>2023-10-21 13:36:43 +0200
committerDavid Robillard <d@drobilla.net>2023-10-21 10:39:03 -0400
commita7803c92f144221edba9a966eb664da8049ce7bf (patch)
treee0517f6cf86b88eb2cc2011cb19fc1675b4c71e3 /src/x11.c
parent8661f96f408dff3b27fc611a39e13ebebd04f0f2 (diff)
downloadpugl-a7803c92f144221edba9a966eb664da8049ce7bf.tar.gz
pugl-a7803c92f144221edba9a966eb664da8049ce7bf.tar.bz2
pugl-a7803c92f144221edba9a966eb664da8049ce7bf.zip
X11: Fix key press event key when control is pressed
Diffstat (limited to 'src/x11.c')
-rw-r--r--src/x11.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/x11.c b/src/x11.c
index ce0bf0b..07642fc 100644
--- a/src/x11.c
+++ b/src/x11.c
@@ -880,8 +880,8 @@ translateKey(PuglView* const view, XEvent* const xevent, PuglEvent* const event)
event->key.keycode = xevent->xkey.keycode;
- // Mask off the shift bit to get the lowercase "main" symbol
- xevent->xkey.state = xevent->xkey.state & ~(unsigned)ShiftMask;
+ // Mask off the control and shift bits to get the lowercase "main" symbol
+ xevent->xkey.state = xevent->xkey.state & ~(unsigned)(ControlMask|ShiftMask);
// Lookup unshifted key
char ustr[8] = {0};