Browse Source

* use stdin instead of stdout to switch the console to raw mode; this fixes
keyboard input in OpenBSD

git-svn-id: trunk@41678 -

nickysn 6 years ago
parent
commit
7c910ee9ca
1 changed files with 2 additions and 2 deletions
  1. 2 2
      packages/rtl-console/src/unix/keyboard.pp

+ 2 - 2
packages/rtl-console/src/unix/keyboard.pp

@@ -124,7 +124,7 @@ procedure SetRawMode(b:boolean);
 var Tio:Termios;
 var Tio:Termios;
 
 
 begin
 begin
-  TCGetAttr(1,Tio);
+  TCGetAttr(0,Tio);
   if b then
   if b then
    begin
    begin
      {Standard output now needs #13#10.}
      {Standard output now needs #13#10.}
@@ -138,7 +138,7 @@ begin
       {Standard output normally needs just a linefeed.}
       {Standard output normally needs just a linefeed.}
       settextlineending(output,#10);
       settextlineending(output,#10);
     end;
     end;
-  TCsetattr(1,TCSANOW,Tio);
+  TCsetattr(0,TCSANOW,Tio);
 end;
 end;
 
 
 {$ifdef linux}
 {$ifdef linux}