Browse Source

* return the proper shift state in the i8086-msdos keyboard unit GetKeyEvent and
PollKeyEvent (previously, it was truncated, due to the native int being 16-bit
on i8086)

Nikolay Nikolov 3 years ago
parent
commit
398c6519a5
1 changed files with 2 additions and 2 deletions
  1. 2 2
      packages/rtl-console/src/msdos/keyboard.pp

+ 2 - 2
packages/rtl-console/src/msdos/keyboard.pp

@@ -53,7 +53,7 @@ begin
   intr($16,regs);
   if (regs.al=$e0) and (regs.ah<>0) then
    regs.al:=0;
-  SysGetKeyEvent:=(kbPhys shl 24) or regs.ax or ((mem[$40:$17] and $f) shl 16);
+  SysGetKeyEvent:=(kbPhys shl 24) or regs.ax or (longint(mem[$40:$17] and $f) shl 16);
 end;
 
 
@@ -67,7 +67,7 @@ begin
    exit(0);
   if (regs.al=$e0) and (regs.ah<>0) then
    regs.al:=0;
-  SysPollKeyEvent:=(kbPhys shl 24) or regs.ax or ((mem[$40:$17] and $f) shl 16);
+  SysPollKeyEvent:=(kbPhys shl 24) or regs.ax or (longint(mem[$40:$17] and $f) shl 16);
 end;