hedgewars/uKeys.pas
changeset 948 5d49a92c240a
parent 947 4e0c3ad89483
child 991 d17c71ee074e
--- a/hedgewars/uKeys.pas	Sat May 24 21:10:49 2008 +0000
+++ b/hedgewars/uKeys.pas	Sat May 24 22:28:40 2008 +0000
@@ -26,6 +26,7 @@
 function KeyNameToCode(name: string): word;
 procedure ProcessKbd;
 procedure ResetKbd;
+procedure FreezeEnterKey;
 procedure InitKbdKeyTable;
 
 procedure SetBinds(var binds: TBinds);
@@ -72,7 +73,8 @@
 	if (i > 3) and (pkbd^[i] <> 0) then KbdKeyPressed:= true;
 	if (tkbd[i] = 0) and (pkbd^[i] <> 0) then ParseCommand(CurrentBinds[i], Trusted)
 	else if (CurrentBinds[i][1] = '+')
-			and (pkbd^[i] = 0)and(tkbd[i] <> 0) then
+			and (pkbd^[i] = 0)
+			and (tkbd[i] <> 0) then
 			begin
 			s:= CurrentBinds[i];
 			s[1]:= '-';
@@ -118,6 +120,7 @@
 DefaultBinds[104]:= 'findhh';
 DefaultBinds[112]:= 'pause';
 DefaultBinds[115]:= '+speedup';
+DefaultBinds[116]:= 'chat';
 DefaultBinds[127]:= 'rotmask';
 SetDefaultBinds
 end;
@@ -132,6 +135,11 @@
 CurrentBinds:= DefaultBinds
 end;
 
+procedure FreezeEnterKey;
+begin
+tkbd[13]:= 1;
+tkbd[271]:= 1
+end;
 
 initialization