Browse Source

* win crt unit returns #13 for numeric enter as well, resolves #13203

git-svn-id: trunk@14459 -
florian 15 years ago
parent
commit
737514c434
1 changed files with 20 additions and 2 deletions
  1. 20 2
      rtl/win/crt.pp

+ 20 - 2
rtl/win/crt.pp

@@ -336,17 +336,35 @@ begin
     $35:      Scancode := $95;   // \
     $37:      Scancode := $96;   // *
     $47..$53: Scancode := CtrlKeypadKeys[Scancode];
+    //Enter on Numpad
+    $1C:
+    begin
+      Scancode := $0A;
+      SpecialKey := False;
+    end;
     end
   else if ShiftKey then
     case Scancode of
     // Function keys
     $3B..$44: inc(Scancode, $19);
     $57..$58: inc(Scancode, $30);
+    //Enter on Numpad
+    $1C:
+    begin
+      Scancode := $0D;
+      SpecialKey := False;
+    end;
     end
   else
     case Scancode of
-    // Function keys
-    $57..$58: inc(Scancode, $2E); // F11 and F12
+      // Function keys
+      $57..$58: inc(Scancode, $2E); // F11 and F12
+      //Enter on NumPad
+      $1C:
+        begin
+          Scancode := $0D;
+          SpecialKey := False;
+        end;
   end;
   RemapScanCode := ScanCode;
 end;