From 68c5d9b86c2a252f87f53804c3af94881c4ae39e Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Wed, 16 May 2012 18:10:07 +0400 Subject: [PATCH] Stop Shift-Enter from being handled as if it was Shift-M. --- library/Core.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/library/Core.cpp b/library/Core.cpp index d7e4435ce..7f08f402f 100644 --- a/library/Core.cpp +++ b/library/Core.cpp @@ -1180,6 +1180,18 @@ int Core::UnicodeAwareSym(const SDL::KeyboardEvent& ke) if( '0' <= ke.ksym.sym && ke.ksym.sym <= '9') return ke.ksym.sym; if(SDL::K_F1 <= ke.ksym.sym && ke.ksym.sym <= SDL::K_F12) return ke.ksym.sym; + // These keys are mapped to the same control codes as Ctrl-? + switch (ke.ksym.sym) { + case SDL::K_RETURN: + case SDL::K_KP_ENTER: + case SDL::K_TAB: + case SDL::K_ESCAPE: + case SDL::K_DELETE: + return ke.ksym.sym; + default: + break; + } + int unicode = ke.ksym.unicode; // convert Ctrl characters to their 0x40-0x5F counterparts: