hedgewars/uInputHandler.pas
changeset 7048 0a4c88935902
parent 7026 8d1724e1337e
child 7049 35d762458d66
equal deleted inserted replaced
7047:606acf1f80be 7048:0a4c88935902
   237 KeyNames[4]:= 'wheelup';
   237 KeyNames[4]:= 'wheelup';
   238 KeyNames[5]:= 'wheeldown';
   238 KeyNames[5]:= 'wheeldown';
   239 
   239 
   240 for i:= 6 to cKeyMaxIndex do
   240 for i:= 6 to cKeyMaxIndex do
   241     begin
   241     begin
   242 {$IFDEF SDL13}
       
   243     s:= shortstring(SDL_GetScancodeName(i));
       
   244 {$ELSE}
       
   245     s:= shortstring(sdl_getkeyname(i));
   242     s:= shortstring(sdl_getkeyname(i));
   246 {$ENDIF}
   243     //WriteToConsole(IntToStr(i) + ': ' + s + ' ' + IntToStr(cKeyMaxIndex));
   247     WriteToConsole(IntToStr(i) + ': ' + s + ' ' + IntToStr(cKeyMaxIndex));
       
   248     if s = 'unknown key' then KeyNames[i]:= ''
   244     if s = 'unknown key' then KeyNames[i]:= ''
   249     else 
   245     else 
   250         begin
   246         begin
   251         for t:= 1 to Length(s) do
   247         for t:= 1 to Length(s) do
   252             if s[t] = ' ' then
   248             if s[t] = ' ' then