equal
deleted
inserted
replaced
307 KeyNames[3]:= 'mouser'; |
307 KeyNames[3]:= 'mouser'; |
308 KeyNames[4]:= 'wheelup'; |
308 KeyNames[4]:= 'wheelup'; |
309 KeyNames[5]:= 'wheeldown'; |
309 KeyNames[5]:= 'wheeldown'; |
310 |
310 |
311 for i:= 6 to cKeyMaxIndex do |
311 for i:= 6 to cKeyMaxIndex do |
312 begin |
312 begin |
313 s:= SDL_GetKeyName(i); |
313 s:= string(sdl_getkeyname(i)); |
314 // addfilelog(inttostr(i) + ' ' + s); |
314 //writeln(stdout,inttostr(i) + ': ' + s); |
315 if s = 'unknown key' then KeyNames[i]:= '' |
315 if s = 'unknown key' then KeyNames[i]:= '' |
316 else begin |
316 else begin |
317 for t:= 1 to Length(s) do |
317 for t:= 1 to Length(s) do |
318 if s[t] = ' ' then s[t]:= '_'; |
318 if s[t] = ' ' then s[t]:= '_'; |
319 KeyNames[i]:= s |
319 KeyNames[i]:= s |
320 end; |
320 end; |
321 end; |
321 end; |
|
322 |
|
323 //for i:= 0 to cKeyMaxIndex do writeln(stdout,inttostr(i) + ': ' + KeyNames[i]); |
322 |
324 |
323 {$IFDEF SDL13} |
325 {$IFDEF SDL13} |
324 PByteArray(SDL_GetKeyboardState(@i)); |
326 PByteArray(SDL_GetKeyboardState(@i)); |
325 {$ELSE} |
327 {$ELSE} |
326 SDL_GetKeyState(@i); |
328 SDL_GetKeyState(@i); |