diff options
| author | Alexander Gavrilov | 2012-05-16 18:10:07 +0400 |
|---|---|---|
| committer | Alexander Gavrilov | 2012-05-16 18:10:07 +0400 |
| commit | 68c5d9b86c2a252f87f53804c3af94881c4ae39e (patch) | |
| tree | f04f5c12b7c5d51ed3a154ecfced984c3e4408d4 /library/Core.cpp | |
| parent | 8185eec95c82ea5acb4f49144e6aab2306bf7cd8 (diff) | |
| download | dfhack-68c5d9b86c2a252f87f53804c3af94881c4ae39e.tar.gz dfhack-68c5d9b86c2a252f87f53804c3af94881c4ae39e.tar.bz2 dfhack-68c5d9b86c2a252f87f53804c3af94881c4ae39e.tar.xz | |
Stop Shift-Enter from being handled as if it was Shift-M.
Diffstat (limited to 'library/Core.cpp')
| -rw-r--r-- | library/Core.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/library/Core.cpp b/library/Core.cpp index d7e4435c..7f08f402 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: |
