mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-13 21:49:11 +02:00
* fixed bug, where left and right shift were swapped in the i8086-msdos
keyboard unit.
This commit is contained in:
parent
398c6519a5
commit
55b8fd6e94
@ -44,6 +44,14 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
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
|
||||
@ -53,7 +61,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 (longint(mem[$40:$17] and $f) shl 16);
|
||||
SysGetKeyEvent:=(kbPhys shl 24) or regs.ax or (longint(SysGetShiftState) shl 16);
|
||||
end;
|
||||
|
||||
|
||||
@ -67,13 +75,7 @@ begin
|
||||
exit(0);
|
||||
if (regs.al=$e0) and (regs.ah<>0) then
|
||||
regs.al:=0;
|
||||
SysPollKeyEvent:=(kbPhys shl 24) or regs.ax or (longint(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 (longint(SysGetShiftState) shl 16);
|
||||
end;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user