From 9155f744d6098fcbaac636f5a8f577b1273166da Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Thu, 15 Dec 2011 16:33:52 +0000 Subject: [PATCH] keys.c (Key_Event): Allow autorepeats in message (chat) mode; based on a patch from Sander van Dijk. Rearrange the autorepeat condition checks a bit, based on uhexen2. git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@522 af15c1b1-3010-417e-b628-4374ebc0bcbd --- Quake/keys.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Quake/keys.c b/Quake/keys.c index dee3cc8d..ef92438c 100644 --- a/Quake/keys.c +++ b/Quake/keys.c @@ -861,13 +861,22 @@ void Key_Event (int key, qboolean down) if (down) { key_repeats[key]++; - if (key_dest != key_console && key_repeats[key] > 1 && !repeatkeys[key]) //johnfitz -- use repeatkeys[] - return; // ignore most autorepeats + if (key_repeats[key] > 1) + { + if (key_dest == key_console) + goto autorep0; + if (key_dest == key_message) + goto autorep0; + if (!repeatkeys[key]) //johnfitz -- use repeatkeys[] + return; // ignore most autorepeats + } if (key >= 200 && !keybindings[key]) Con_Printf ("%s is unbound, hit F4 to set.\n", Key_KeynumToString (key) ); } +autorep0: + if (key == K_SHIFT) shift_down = down;