Browse Source

+ detect and return the state of num lock, caps lock and scroll lock in the enhanced shift state on win32/win64

git-svn-id: branches/unicodekvm@40317 -
nickysn 6 years ago
parent
commit
aac266e82d
1 changed files with 6 additions and 0 deletions
  1. 6 0
      packages/rtl-console/src/win/keyboard.pp

+ 6 - 0
packages/rtl-console/src/win/keyboard.pp

@@ -160,6 +160,12 @@ begin
     b:=b+[essAlt,essLeftAlt];
   if ControlKeyState and RIGHT_ALT_PRESSED <> 0 then
     b:=b+[essAlt,essRightAlt];
+  if ControlKeyState and NUMLOCK_ON <> 0 then
+    Include(b,essNumLockOn);
+  if ControlKeyState and CAPSLOCK_ON <> 0 then
+    Include(b,essCapsLockOn);
+  if ControlKeyState and SCROLLLOCK_ON <> 0 then
+    Include(b,essScrollLockOn);
   transEnhShiftState := b;
 end;