aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRadAd <adamgates84+github@gmail.com>2019-05-24 13:42:36 +1000
committerRadAd <adamgates84+github@gmail.com>2019-05-24 13:42:36 +1000
commitfab29d0a0a85a06647ab3ad704ee2c6cb7db0edb (patch)
treed48ed5345a976c8bacce67c4cc09fafd019bcaf6
parentb109b3aa802ba463200eeced0f654f5316549deb (diff)
downloadRadTerminal-fab29d0a0a85a06647ab3ad704ee2c6cb7db0edb.tar.gz
RadTerminal-fab29d0a0a85a06647ab3ad704ee2c6cb7db0edb.zip
Better handling of ctrl,alt,etc.
-rw-r--r--.gitignore1
-rw-r--r--RadTerminal.cpp10
2 files changed, 6 insertions, 5 deletions
diff --git a/.gitignore b/.gitignore
index a15991d..b2c6157 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,4 +2,5 @@ Bin/
Int/
.vs/
*.VC.db
+*.VC.VC.opendb
*.vcxproj.user
diff --git a/RadTerminal.cpp b/RadTerminal.cpp
index ff0d61b..87696d5 100644
--- a/RadTerminal.cpp
+++ b/RadTerminal.cpp
@@ -412,15 +412,15 @@ void RadTerminalWindowOnKeyDown(HWND hWnd, UINT vk, BOOL fDown, int cRepeat, UIN
uint32_t unicode = ascii;
unsigned int mods = 0;
- if (KeyState[VK_SHIFT] != 0)
+ if (KeyState[VK_SHIFT] & 0x8)
mods |= TSM_SHIFT_MASK;
- if (KeyState[VK_SCROLL] != 0)
+ if (KeyState[VK_SCROLL] & 0x8)
mods |= TSM_LOCK_MASK;
- if (KeyState[VK_CONTROL] != 0)
+ if (KeyState[VK_CONTROL] & 0x8)
mods |= TSM_CONTROL_MASK;
- if (KeyState[VK_MENU] != 0)
+ if (KeyState[VK_MENU] & 0x8)
mods |= TSM_ALT_MASK;
- if (KeyState[VK_LWIN] != 0)
+ if (KeyState[VK_LWIN] & 0x8)
mods |= TSM_LOGO_MASK;
UINT scan = (cRepeat >> 8);