mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 16:49:20 +02:00
amiga: FPC_DOKEYCONVERSION env var if key conversation Ansi to IBM should be done for every key
This commit is contained in:
parent
e1a75bf658
commit
8117c97d92
@ -34,11 +34,14 @@ function WaitForSystemEvent(millisec: Integer): boolean;
|
|||||||
function IBMToANSI(s: RawByteString): RawByteString;
|
function IBMToANSI(s: RawByteString): RawByteString;
|
||||||
function ANSIToIBM(s: RawByteString): RawByteString;
|
function ANSIToIBM(s: RawByteString): RawByteString;
|
||||||
|
|
||||||
|
var
|
||||||
|
FPC_DOKEYCONVERSION: boolean = False;
|
||||||
|
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
video, exec, intuition, inputevent, mouse, sysutils, keymap, timer;
|
video, exec, intuition, inputevent, mouse, sysutils, keymap, timer, amigados;
|
||||||
|
|
||||||
{$i keyboard.inc}
|
{$i keyboard.inc}
|
||||||
{$i keyscan.inc}
|
{$i keyscan.inc}
|
||||||
@ -460,7 +463,8 @@ begin
|
|||||||
ie.ie_position.ie_addr := PPointer(IAddr)^;
|
ie.ie_position.ie_addr := PPointer(IAddr)^;
|
||||||
Buff[0] := #0;
|
Buff[0] := #0;
|
||||||
Ret := MapRawKey(@ie, @Buff[0], 1, nil);
|
Ret := MapRawKey(@ie, @Buff[0], 1, nil);
|
||||||
AnsiToIBMChar(Buff[0]);
|
if FPC_DOKEYCONVERSION then
|
||||||
|
AnsiToIBMChar(Buff[0]);
|
||||||
KeyCode := Ord(Buff[0]);
|
KeyCode := Ord(Buff[0]);
|
||||||
KeySet^.KeyCode := Ord(Buff[0]); // if maprawkey does not work it still is 0
|
KeySet^.KeyCode := Ord(Buff[0]); // if maprawkey does not work it still is 0
|
||||||
KeySet^.ShiftState := LastShiftState; // shift state set before the case
|
KeySet^.ShiftState := LastShiftState; // shift state set before the case
|
||||||
@ -712,7 +716,13 @@ end;
|
|||||||
procedure InitSystemEventWait;
|
procedure InitSystemEventWait;
|
||||||
var
|
var
|
||||||
initOK: boolean;
|
initOK: boolean;
|
||||||
|
envBuf: array[0..15] of char;
|
||||||
begin
|
begin
|
||||||
|
{.$if not defined(AMIGA_V1_2_ONLY)}
|
||||||
|
if GetVar('FPC_DOKEYCONVERSION',@envBuf,sizeof(envBuf),0) > -1 then
|
||||||
|
FPC_DOKEYCONVERSION := True;
|
||||||
|
{.$endif}
|
||||||
|
|
||||||
waitTimerFired:=false;
|
waitTimerFired:=false;
|
||||||
waitTPort:=CreateMsgPort();
|
waitTPort:=CreateMsgPort();
|
||||||
if assigned(waitTPort) then
|
if assigned(waitTPort) then
|
||||||
|
Loading…
Reference in New Issue
Block a user