Michaël Van Canneyt 5 місяців тому
батько
коміт
d8a3628308
1 змінених файлів з 12 додано та 0 видалено
  1. 12 0
      src/base/fresnel.keys.pas

+ 12 - 0
src/base/fresnel.keys.pas

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