|
@@ -26,6 +26,14 @@ uses
|
|
|
{$i keyboard.inc}
|
|
|
|
|
|
|
|
|
+function SysGetShiftState: Byte;
|
|
|
+begin
|
|
|
+ SysGetShiftState:=(mem[$40:$17] and %1100) or
|
|
|
+ ((mem[$40:$17] and %0010) shr 1) or
|
|
|
+ ((mem[$40:$17] and %0001) shl 1);
|
|
|
+end;
|
|
|
+
|
|
|
+
|
|
|
function SysGetKeyEvent: TKeyEvent;
|
|
|
|
|
|
var
|
|
@@ -35,7 +43,7 @@ begin
|
|
|
realintr($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 (SysGetShiftState shl 16);
|
|
|
end;
|
|
|
|
|
|
|
|
@@ -49,13 +57,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);
|
|
|
-end;
|
|
|
-
|
|
|
-
|
|
|
-function SysGetShiftState: Byte;
|
|
|
-begin
|
|
|
- SysGetShiftState:=(mem[$40:$17] and $f);
|
|
|
+ SysPollKeyEvent:=(kbPhys shl 24) or regs.ax or (SysGetShiftState shl 16);
|
|
|
end;
|
|
|
|
|
|
|