From 28071a66b830c0dcef35a6f48d3f84b59f47df31 Mon Sep 17 00:00:00 2001 From: "Adam D. Ruppe" Date: Mon, 6 Mar 2017 19:13:03 -0500 Subject: [PATCH] ketmar patch --- simpledisplay.d | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/simpledisplay.d b/simpledisplay.d index 87f46ba..2a1d625 100644 --- a/simpledisplay.d +++ b/simpledisplay.d @@ -6467,7 +6467,12 @@ version(X11) { // char events are separate since they are on Windows too // also, xcompose can generate long char sequences - if (ke.pressed && charbuflen > 0) { + // don't send char events if Meta and/or Hyper is pressed + // TODO: ctrl+char should only send control chars; not yet + if ((e.xkey.state&ModifierState.ctrl) != 0) { + if (charbuflen > 1 || charbuf[0] >= ' ') charbuflen = 0; + } + if (ke.pressed && charbuflen > 0 && (e.xkey.state&(ModifierState.alt|ModifierState.windows)) == 0) { // FIXME: I think Windows sends these on releases... we should try to match that, but idk about repeats. foreach (immutable dchar ch; charbuf[0..charbuflen]) { if (win.handleCharEvent) {