Ver Fonte

* CheckAltGr moved above HandleKeyboard, because it will be invoked from there also

git-svn-id: branches/unicodekvm@41605 -
nickysn há 6 anos atrás
pai
commit
4034dcc2c6
1 ficheiros alterados com 27 adições e 27 exclusões
  1. 27 27
      packages/rtl-console/src/win/keyboard.pp

+ 27 - 27
packages/rtl-console/src/win/keyboard.pp

@@ -149,6 +149,33 @@ begin
   transShiftState := b;
 end;
 
+procedure CheckAltGr;
+
+var ahkl : HKL;
+    i    : integer;
+
+ begin
+   HasAltGr:=false;
+
+   ahkl:=GetKeyboardLayout(0);
+   i:=$20;
+   while i<$100 do
+     begin
+       // <MSDN>
+       // For keyboard layouts that use the right-hand ALT key as a shift key
+       // (for example, the French keyboard layout), the shift state is
+       // represented by the value 6, because the right-hand ALT key is
+       // converted internally into CTRL+ALT.
+       // </MSDN>
+      if (HIBYTE(VkKeyScanEx(chr(i),ahkl))=6) then
+        begin
+          HasAltGr:=true;
+          break;
+        end;
+     inc(i);
+    end;
+end;
+
 
 { The event-Handler thread from the unit event will call us if a key-event
   is available }
@@ -304,33 +331,6 @@ begin
     end;
 end;
 
-procedure CheckAltGr;
-
-var ahkl : HKL;
-    i    : integer;
-
- begin
-   HasAltGr:=false;
-
-   ahkl:=GetKeyboardLayout(0);
-   i:=$20;
-   while i<$100 do
-     begin
-       // <MSDN>
-       // For keyboard layouts that use the right-hand ALT key as a shift key
-       // (for example, the French keyboard layout), the shift state is
-       // represented by the value 6, because the right-hand ALT key is
-       // converted internally into CTRL+ALT.
-       // </MSDN>
-      if (HIBYTE(VkKeyScanEx(chr(i),ahkl))=6) then
-        begin
-          HasAltGr:=true;
-          break;
-        end;
-     inc(i);
-    end;
-end;
-