Quellcode durchsuchen

Fixed hotkeys problems left after https://gitlab.com/freepascal.org/fpc/source/-/merge_requests/1138
See https://gitlab.com/freepascal.org/fpc/source/-/merge_requests/1138#note_2734591449 for details

Ivan Sorokin vor 1 Woche
Ursprung
Commit
1ac1b12a3a
1 geänderte Dateien mit 6 neuen und 1 gelöschten Zeilen
  1. 6 1
      packages/rtl-console/src/unix/keyboard.pp

+ 6 - 1
packages/rtl-console/src/unix/keyboard.pp

@@ -2231,6 +2231,7 @@ var
         kbDown : byte;
         nKey : longint;
         modifier: longint;
+        shortCutKey: LongInt;
     begin   {
          if arrayind>0 then
          for i:= 0 to arrayind-1 do
@@ -2371,7 +2372,11 @@ var
               nKey:=unicodeCodePoint;
               if (enh[1]>=0) then
                 nKey:=enh[1];
-              BuildKeyEvent(modifier,nKey,nKey);
+
+              shortCutKey := enh[2];
+              if shortCutKey < 0 then
+                shortCutKey := nKey;
+              BuildKeyEvent(modifier, nKey, shortCutKey);
            end;
            arrayind:=0;
         end;