From 8fb9a3b3d58db1d1717baeba124f09ea2fee3214 Mon Sep 17 00:00:00 2001 From: Inuyasha Date: Mon, 26 Dec 2016 21:32:35 -0800 Subject: [PATCH] Ignore modifier keys in chat (Fixes LSHIFT typing D repeatedly into chat) --- src/hu_stuff.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/hu_stuff.c b/src/hu_stuff.c index e33a5430..a5756691 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -790,6 +790,14 @@ boolean HU_Responder(event_t *ev) } else // if chat_on { + // Ignore modifier keys + // Note that we do this here so users can still set + // their chat keys to one of these, if they so desire. + if (ev->data1 == KEY_LSHIFT || ev->data1 == KEY_RSHIFT + || ev->data1 == KEY_LCTRL || ev->data1 == KEY_RCTRL + || ev->data1 == KEY_LALT || ev->data1 == KEY_RALT) + return true; + c = (UINT8)ev->data1; // use console translations