hedgewars/uInputHandler.pas
changeset 6982 8d41d22a291d
parent 6954 a61458a81480
child 6992 b8f3d8991e92
equal deleted inserted replaced
6981:045e8162c9cd 6982:8d41d22a291d
    46 uses uConsole, uCommands, uMisc, uVariables, uConsts, uUtils, uDebug;
    46 uses uConsole, uCommands, uMisc, uVariables, uConsts, uUtils, uDebug;
    47 
    47 
    48 var tkbd, tkbdn: TKeyboardState;
    48 var tkbd, tkbdn: TKeyboardState;
    49     quitKeyCode: Byte;
    49     quitKeyCode: Byte;
    50     KeyNames: array [0..cKeyMaxIndex] of string[15];
    50     KeyNames: array [0..cKeyMaxIndex] of string[15];
    51     
    51     CurrentBinds: TBinds;
    52 
    52 
    53 function KeyNameToCode(name: shortstring): word;
    53 function KeyNameToCode(name: shortstring): word;
    54 var code: Word;
    54 var code: Word;
    55 begin
    55 begin
    56     name:= LowerCase(name);
    56     name:= LowerCase(name);
   448 
   448 
   449 procedure initModule;
   449 procedure initModule;
   450 begin
   450 begin
   451     wheelUp:= false;
   451     wheelUp:= false;
   452     wheelDown:= false;
   452     wheelDown:= false;
   453 {$IFDEF HWLIBRARY}
       
   454     // this function is called by HW_allKeysUp so be careful
       
   455 
       
   456     // mouse emulation
       
   457     leftClick:= false;
       
   458     middleClick:= false;
       
   459     rightClick:= false;
       
   460 
       
   461     // arrow key emulation
       
   462     upKey:= false;
       
   463     downKey:= false;
       
   464     rightKey:= false;
       
   465     leftKey:= false;
       
   466     preciseKey:= false;
       
   467 
       
   468     // action key emulation
       
   469     backspaceKey:= false;
       
   470     spaceKey:= false;
       
   471     enterKey:= false;
       
   472     tabKey:= false;
       
   473 
       
   474     // other key emulation
       
   475     chatAction:= false;
       
   476     pauseAction:= false;
       
   477 {$ENDIF}
       
   478 end;
   453 end;
   479 
   454 
   480 procedure freeModule;
   455 procedure freeModule;
   481 begin
   456 begin
   482 
   457