Browse Source

+ added a global variable Utf8KeyboardInputEnabled in the implementation of the
unix keyboard unit. Initialize it in SysInitKeyboard with the value, returned
by UnixKvmBase.UTF8Enabled (the same function that checks whether UTF-8 output
should be enabled in the video unit).

git-svn-id: branches/unicodekvm@41369 -

nickysn 6 years ago
parent
commit
0f61895194
2 changed files with 4 additions and 1 deletions
  1. 1 0
      packages/rtl-console/fpmake.pp
  2. 3 1
      packages/rtl-console/src/unix/keyboard.pp

+ 1 - 0
packages/rtl-console/fpmake.pp

@@ -80,6 +80,7 @@ begin
         AddInclude('nwsys.inc',[netware]);
         AddUnit   ('mouse',AllUnixOSes);
         AddUnit   ('video',[win16]);
+        AddUnit   ('unixkvmbase',AllUnixOSes);
       end;
 
     T:=P.Targets.AddUnit('mouse.pp',MouseOSes);

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

@@ -56,13 +56,14 @@ function AddSpecialSequence(const St : string;Proc : Tprocedure) : PTreeElement;
 {*****************************************************************************}
 
 uses
-  Mouse,  Strings,
+  Mouse,  Strings,unixkvmbase,
   termio,baseUnix
   {$ifdef linux},linuxvcs{$endif};
 
 {$i keyboard.inc}
 
 var OldIO,StartTio : TermIos;
+    Utf8KeyboardInputEnabled: Boolean;
 {$ifdef linux}
     is_console:boolean;
     vt_switched_away:boolean;
@@ -1445,6 +1446,7 @@ end;
 
 procedure SysInitKeyboard;
 begin
+  Utf8KeyboardInputEnabled:=UnixKVMBase.UTF8Enabled;
   SetRawMode(true);
 {$ifdef logging}
      assign(f,'keyboard.log');