From 12af3970c2d7e124677d996df9e61e67cf9b37b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Thomas?= Date: Tue, 7 Mar 2017 18:22:41 +0100 Subject: [PATCH] Don't interpret K_KP_DOWNARROW and K_KP_UPARROW in console. These map to the 2 and 8 on the keypad which makes it impossible to use them on the console for entering numbers. This is especially important for AZERTY layouts where the number keys are not directly accessible in the first row and using the keypad is more convenient. --- code/client/cl_keys.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/client/cl_keys.c b/code/client/cl_keys.c index f73083a5..89d99ba5 100644 --- a/code/client/cl_keys.c +++ b/code/client/cl_keys.c @@ -667,7 +667,7 @@ void Console_Key (int key) { // command history (ctrl-p ctrl-n for unix style) - if ( (key == K_MWHEELUP && keys[K_SHIFT].down) || ( key == K_UPARROW ) || ( key == K_KP_UPARROW ) || + if ( (key == K_MWHEELUP && keys[K_SHIFT].down) || key == K_UPARROW || ( ( tolower(key) == 'p' ) && keys[K_CTRL].down ) ) { if ( nextHistoryLine - historyLine < COMMAND_HISTORY && historyLine > 0 ) { @@ -677,7 +677,7 @@ void Console_Key (int key) { return; } - if ( (key == K_MWHEELDOWN && keys[K_SHIFT].down) || ( key == K_DOWNARROW ) || ( key == K_KP_DOWNARROW ) || + if ( (key == K_MWHEELDOWN && keys[K_SHIFT].down) || key == K_DOWNARROW || ( ( tolower(key) == 'n' ) && keys[K_CTRL].down ) ) { historyLine++; if (historyLine >= nextHistoryLine) {