Prechádzať zdrojové kódy

* return the shiftstate in ReadKey

git-svn-id: branches/unicodekvm@41487 -
nickysn 6 rokov pred
rodič
commit
ba1450f7e9
1 zmenil súbory, kde vykonal 9 pridanie a 0 odobranie
  1. 9 0
      packages/rtl-console/src/unix/keyboard.pp

+ 9 - 0
packages/rtl-console/src/unix/keyboard.pp

@@ -1401,6 +1401,7 @@ var
   store    : array [0..8] of char;
   arrayind : byte;
   NPT,NNPT : PTreeElement;
+  SState: TEnhancedShiftState;
 
 
     procedure RestoreArray;
@@ -1413,6 +1414,7 @@ var
           k := NilEnhancedKeyEvent;
           k.AsciiChar := store[i];
           k.VirtualScanCode := Ord(k.AsciiChar);
+          k.ShiftState := SState;
           { todo: how to set the other fields? }
           PushKey(k);
         end;
@@ -1436,6 +1438,13 @@ begin
      fpSelect (StdInputHandle+1,@fdsin,nil,nil,nil);
    end;
   k:=NilEnhancedKeyEvent;
+{$ifdef linux}
+  if is_console then
+    SState:=EnhShiftState
+  else
+{$endif}
+    SState:=[];
+  k.ShiftState:=SState;
   ch:=ttyRecvChar;
   k.AsciiChar:=ch;
   NPT:=RootTree[ch];