From d1658542e3335ae011c385816632ca3151c3567e Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Tue, 26 Nov 2019 17:34:49 +0100 Subject: [PATCH] GL: correctly translate Ctrl- --- src/video_display/gl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/video_display/gl.cpp b/src/video_display/gl.cpp index d9ed29459..7d8a9c332 100644 --- a/src/video_display/gl.cpp +++ b/src/video_display/gl.cpp @@ -1019,8 +1019,8 @@ static int64_t translate_glut_to_ug(int key, bool is_special) { if (glutGetModifiers() == 0) { return key; } - if (glutGetModifiers() == GLUT_ACTIVE_CTRL && isalpha(key)) { - return K_CTRL(key); + if (glutGetModifiers() == GLUT_ACTIVE_CTRL && key >= 1 && key <= 26) { + return K_CTRL('a' + key - 1); } if (glutGetModifiers() == GLUT_ACTIVE_ALT && isalpha(key)) { return K_ALT(key);