hedgewars/uKeys.pas
changeset 2786 85f6425a4d74
parent 2754 ad4f81fbfb76
child 2805 36a8cebb91e8
--- a/hedgewars/uKeys.pas	Tue Feb 09 21:51:52 2010 +0000
+++ b/hedgewars/uKeys.pas	Wed Feb 10 00:55:40 2010 +0000
@@ -57,7 +57,9 @@
 	//ControllerBalls: array[0..5] of array[0..19] of array[0..1] of Integer;
 	ControllerHats: array[0..5] of array[0..19] of Byte;
 	ControllerButtons: array[0..5] of array[0..19] of Byte;
-	
+
+	DefaultBinds, CurrentBinds: TBinds;
+
 {$IFDEF IPHONEOS}
 	leftClick: boolean;
 	middleClick: boolean;
@@ -86,7 +88,6 @@
 
 var tkbd, tkbdn: TKeyboardState;
     KeyNames: array [0..cKeyMaxIndex] of string[15];
-    DefaultBinds, CurrentBinds: TBinds;
 	
 function KeyNameToCode(name: string): word;
 var code: Word;
@@ -321,18 +322,26 @@
 
 DefaultBinds[KeyNameToCode('f12')]:= 'fullscr';
 
-{$IFDEF IPHONEOS}
+
+
 DefaultBinds[ 1]:= '/put';
 DefaultBinds[ 3]:= 'ammomenu';
 DefaultBinds[ 8]:= 'hjump';
 DefaultBinds[ 9]:= 'switch';
 DefaultBinds[13]:= 'ljump';
+DefaultBinds[32]:= '+attack';
+{$IFDEF IPHONEOS}
 DefaultBinds[23]:= '+up';
 DefaultBinds[24]:= '+down';
 DefaultBinds[25]:= '+left';
 DefaultBinds[26]:= '+right';
-DefaultBinds[32]:= '+attack';
 DefaultBinds[44]:= 'chat';
+{$ELSE}
+DefaultBinds[KeyNameToCode('up')]:= '+up';
+DefaultBinds[KeyNameToCode('down')]:= '+down';
+DefaultBinds[KeyNameToCode('left')]:= '+left';
+DefaultBinds[KeyNameToCode('right')]:= '+right';
+DefaultBinds[KeyNameToCode('left_shift')]:= '+precise';
 {$ENDIF}
 
 SetDefaultBinds();