소스 검색

+ get the current DOS code page in the go32v2 keyboard unit, so enhanced key
events Unicode characters are returned correctly (provided that the cpall and
fpwidestring unit are included as well)

Nikolay Nikolov 3 년 전
부모
커밋
c881067b23
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      packages/rtl-console/src/go32v2/keyboard.pp

+ 6 - 0
packages/rtl-console/src/go32v2/keyboard.pp

@@ -30,6 +30,8 @@ var
 
 
 
 
 procedure SysInitKeyboard;
 procedure SysInitKeyboard;
+const
+  fCarry=1;
 var
 var
   regs: trealregs;
   regs: trealregs;
 begin
 begin
@@ -41,6 +43,10 @@ begin
       if regs.ax<>$1200 then
       if regs.ax<>$1200 then
         keyboard_type:=$10;
         keyboard_type:=$10;
     end;
     end;
+  regs.ax:=$6601;
+  realintr($21,regs);
+  if (regs.flags and fCarry) = 0 then
+     CurrentLegacy2EnhancedKeyEventTranslationCodePage:=regs.bx;
 end;
 end;