|
@@ -763,7 +763,9 @@ Type
|
|
TShortCutCombo = record
|
|
TShortCutCombo = record
|
|
KeyCode : Integer;
|
|
KeyCode : Integer;
|
|
Shift : TShiftState;
|
|
Shift : TShiftState;
|
|
|
|
+ {$IFNDEF PAS2JS}
|
|
class operator = (a,b :TShortCutCombo) : Boolean;
|
|
class operator = (a,b :TShortCutCombo) : Boolean;
|
|
|
|
+ {$ENDIF}
|
|
constructor create(aKeyCode : Integer; aShift : TShiftState);
|
|
constructor create(aKeyCode : Integer; aShift : TShiftState);
|
|
end;
|
|
end;
|
|
|
|
|
|
@@ -813,7 +815,9 @@ function ShortCutRegistry : TShortcutRegistry;
|
|
|
|
|
|
implementation
|
|
implementation
|
|
|
|
|
|
|
|
+{$IFNDEF PAS2JS}
|
|
uses UTF8Utils;
|
|
uses UTF8Utils;
|
|
|
|
+{$ENDIF}
|
|
|
|
|
|
function GetSpecialKeyCount : Integer;
|
|
function GetSpecialKeyCount : Integer;
|
|
|
|
|
|
@@ -1231,7 +1235,13 @@ var
|
|
Idx : integer;
|
|
Idx : integer;
|
|
begin
|
|
begin
|
|
if aKeyCode>0 then
|
|
if aKeyCode>0 then
|
|
|
|
+ begin
|
|
|
|
+ {$IFNDEF PAS2JS}
|
|
Result:=UTF8Utils.UnicodeToUTF8(aKeyCode)
|
|
Result:=UTF8Utils.UnicodeToUTF8(aKeyCode)
|
|
|
|
+ {$ELSE}
|
|
|
|
+ Result:='?';
|
|
|
|
+ {$ENDIF}
|
|
|
|
+ end
|
|
else
|
|
else
|
|
begin
|
|
begin
|
|
Result:='';
|
|
Result:='';
|
|
@@ -1293,10 +1303,12 @@ end;
|
|
|
|
|
|
{ TShortCutCombo }
|
|
{ TShortCutCombo }
|
|
|
|
|
|
|
|
+{$IFNDEF PAS2JS}
|
|
class operator TShortCutCombo.=(a, b: TShortCutCombo): Boolean;
|
|
class operator TShortCutCombo.=(a, b: TShortCutCombo): Boolean;
|
|
begin
|
|
begin
|
|
Result:=(a.KeyCode=b.KeyCode) and (a.Shift=b.Shift);
|
|
Result:=(a.KeyCode=b.KeyCode) and (a.Shift=b.Shift);
|
|
end;
|
|
end;
|
|
|
|
+{$ENDIF}
|
|
|
|
|
|
constructor TShortCutCombo.create(aKeyCode: Integer; aShift: TShiftState);
|
|
constructor TShortCutCombo.create(aKeyCode: Integer; aShift: TShiftState);
|
|
begin
|
|
begin
|