hedgewars/uKeys.pas
author unc0rr
Thu, 10 Sep 2009 18:50:53 +0000
changeset 2379 d62b1f224982
parent 2328 e74f2db28b21
child 2407 9f413bd5150e
permissions -rw-r--r--
- Implement zoom reset - Implement mouse wheel events processing - Increase zooming speed twice - Bind zoom to mouse wheel, zoom reset to middle mouse button - Some formatting changes (yes, I'm evil :D )
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
     1
(*
1066
1f1b3686a2b0 Update copyright headers a bit
unc0rr
parents: 1051
diff changeset
     2
 * Hedgewars, a free turn based strategy game
883
07a568ba44e0 Update copyright info in source files headers
unc0rr
parents: 846
diff changeset
     3
 * Copyright (c) 2004-2008 Andrey Korotaev <unC0Rr@gmail.com>
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
     4
 *
183
57c2ef19f719 Relicense to GPL
unc0rr
parents: 176
diff changeset
     5
 * This program is free software; you can redistribute it and/or modify
57c2ef19f719 Relicense to GPL
unc0rr
parents: 176
diff changeset
     6
 * it under the terms of the GNU General Public License as published by
57c2ef19f719 Relicense to GPL
unc0rr
parents: 176
diff changeset
     7
 * the Free Software Foundation; version 2 of the License
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
     8
 *
183
57c2ef19f719 Relicense to GPL
unc0rr
parents: 176
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
57c2ef19f719 Relicense to GPL
unc0rr
parents: 176
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
57c2ef19f719 Relicense to GPL
unc0rr
parents: 176
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
57c2ef19f719 Relicense to GPL
unc0rr
parents: 176
diff changeset
    12
 * GNU General Public License for more details.
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
    13
 *
183
57c2ef19f719 Relicense to GPL
unc0rr
parents: 176
diff changeset
    14
 * You should have received a copy of the GNU General Public License
57c2ef19f719 Relicense to GPL
unc0rr
parents: 176
diff changeset
    15
 * along with this program; if not, write to the Free Software
57c2ef19f719 Relicense to GPL
unc0rr
parents: 176
diff changeset
    16
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
    17
 *)
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
    18
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
    19
unit uKeys;
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
    20
interface
345
fa39c61be4de Some fixes, revert debug code
unc0rr
parents: 299
diff changeset
    21
uses uConsts;
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
    22
{$INCLUDE options.inc}
167
805fa9a27e9e "Trusted" binds
unc0rr
parents: 161
diff changeset
    23
805fa9a27e9e "Trusted" binds
unc0rr
parents: 161
diff changeset
    24
type TBinds = array[0..cKeyMaxIndex] of shortstring;
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
    25
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
    26
function KeyNameToCode(name: string): word;
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
    27
procedure ProcessKbd;
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
    28
procedure ResetKbd;
948
5d49a92c240a Fix chat behavior
unc0rr
parents: 947
diff changeset
    29
procedure FreezeEnterKey;
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
    30
procedure InitKbdKeyTable;
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
    31
167
805fa9a27e9e "Trusted" binds
unc0rr
parents: 161
diff changeset
    32
procedure SetBinds(var binds: TBinds);
805fa9a27e9e "Trusted" binds
unc0rr
parents: 161
diff changeset
    33
procedure SetDefaultBinds;
805fa9a27e9e "Trusted" binds
unc0rr
parents: 161
diff changeset
    34
161
d8870bbf960e - AmmoMenu
unc0rr
parents: 109
diff changeset
    35
var KbdKeyPressed: boolean;
2379
d62b1f224982 - Implement zoom reset
unc0rr
parents: 2328
diff changeset
    36
	wheelUp: boolean = false;
d62b1f224982 - Implement zoom reset
unc0rr
parents: 2328
diff changeset
    37
	wheelDown: boolean = false;
161
d8870bbf960e - AmmoMenu
unc0rr
parents: 109
diff changeset
    38
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
    39
implementation
2222
2e98698b76aa reworked progress structure
koda
parents: 2171
diff changeset
    40
uses SDLh, uTeams, uConsole, uMisc, uStore;
109
ab0340f580c2 - Initialize translations earlier
unc0rr
parents: 42
diff changeset
    41
const KeyNumber = 1024;
ab0340f580c2 - Initialize translations earlier
unc0rr
parents: 42
diff changeset
    42
type TKeyboardState = array[0..cKeyMaxIndex] of Byte;
167
805fa9a27e9e "Trusted" binds
unc0rr
parents: 161
diff changeset
    43
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
    44
var tkbd: TKeyboardState;
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
    45
    KeyNames: array [0..cKeyMaxIndex] of string[15];
167
805fa9a27e9e "Trusted" binds
unc0rr
parents: 161
diff changeset
    46
    DefaultBinds, CurrentBinds: TBinds;
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
    47
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
    48
function KeyNameToCode(name: string): word;
351
29bc9c36ad5f Fixed-point arithmetics in engine.
unc0rr
parents: 345
diff changeset
    49
var Result: Word;
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
    50
begin
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
    51
Result:= cKeyMaxIndex;
351
29bc9c36ad5f Fixed-point arithmetics in engine.
unc0rr
parents: 345
diff changeset
    52
while (Result > 0) and (KeyNames[Result] <> name) do dec(Result);
29bc9c36ad5f Fixed-point arithmetics in engine.
unc0rr
parents: 345
diff changeset
    53
KeyNameToCode:= Result
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
    54
end;
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
    55
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
    56
procedure ProcessKbd;
371
731ad6d27bd1 integer -> LongInt
unc0rr
parents: 351
diff changeset
    57
var  i: LongInt;
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
    58
     s: shortstring;
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
    59
     pkbd: PByteArray;
167
805fa9a27e9e "Trusted" binds
unc0rr
parents: 161
diff changeset
    60
     Trusted: boolean;
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
    61
begin
167
805fa9a27e9e "Trusted" binds
unc0rr
parents: 161
diff changeset
    62
KbdKeyPressed:= false;
805fa9a27e9e "Trusted" binds
unc0rr
parents: 161
diff changeset
    63
Trusted:= (CurrentTeam <> nil)
351
29bc9c36ad5f Fixed-point arithmetics in engine.
unc0rr
parents: 345
diff changeset
    64
          and (not CurrentTeam^.ExtDriven)
846
08c3f0bc766c Fix bug with handling keys while it is AI's turn
unc0rr
parents: 626
diff changeset
    65
          and (CurrentHedgehog^.BotLevel = 0);
161
d8870bbf960e - AmmoMenu
unc0rr
parents: 109
diff changeset
    66
2152
a2811690da1b Patch by koda:
unc0rr
parents: 2008
diff changeset
    67
{$IFDEF SDL13}
2171
8208946331ba Smaxx refactor of LoadImage to use flags, iphone changes by koda (mostly use of rgba instead of rgb)
nemo
parents: 2163
diff changeset
    68
pkbd := SDL_GetKeyboardState(nil);
2328
e74f2db28b21 improved fix for right click on mac
koda
parents: 2312
diff changeset
    69
i    := SDL_GetMouseState(0, nil, nil);
2152
a2811690da1b Patch by koda:
unc0rr
parents: 2008
diff changeset
    70
{$ELSE}
2171
8208946331ba Smaxx refactor of LoadImage to use flags, iphone changes by koda (mostly use of rgba instead of rgb)
nemo
parents: 2163
diff changeset
    71
pkbd := SDL_GetKeyState(nil);
2328
e74f2db28b21 improved fix for right click on mac
koda
parents: 2312
diff changeset
    72
i    := SDL_GetMouseState(nil, nil);
2152
a2811690da1b Patch by koda:
unc0rr
parents: 2008
diff changeset
    73
{$ENDIF}
2171
8208946331ba Smaxx refactor of LoadImage to use flags, iphone changes by koda (mostly use of rgba instead of rgb)
nemo
parents: 2163
diff changeset
    74
2379
d62b1f224982 - Implement zoom reset
unc0rr
parents: 2328
diff changeset
    75
// mouse buttons
2152
a2811690da1b Patch by koda:
unc0rr
parents: 2008
diff changeset
    76
{$IFDEF DARWIN}
2328
e74f2db28b21 improved fix for right click on mac
koda
parents: 2312
diff changeset
    77
pkbd^[1]:= ((i and 1) and not (pkbd^[306] or pkbd^[305]));
e74f2db28b21 improved fix for right click on mac
koda
parents: 2312
diff changeset
    78
pkbd^[3]:= ((i and 1) and (pkbd^[306] or pkbd^[305])) or (i and 4);
2152
a2811690da1b Patch by koda:
unc0rr
parents: 2008
diff changeset
    79
{$ELSE}
2328
e74f2db28b21 improved fix for right click on mac
koda
parents: 2312
diff changeset
    80
pkbd^[1]:= (i and 1);
161
d8870bbf960e - AmmoMenu
unc0rr
parents: 109
diff changeset
    81
pkbd^[3]:= ((i shr 2) and 1);
2152
a2811690da1b Patch by koda:
unc0rr
parents: 2008
diff changeset
    82
{$ENDIF}
2328
e74f2db28b21 improved fix for right click on mac
koda
parents: 2312
diff changeset
    83
pkbd^[2]:= ((i shr 1) and 1);
e74f2db28b21 improved fix for right click on mac
koda
parents: 2312
diff changeset
    84
2379
d62b1f224982 - Implement zoom reset
unc0rr
parents: 2328
diff changeset
    85
// mouse wheels (see event loop in project file)
d62b1f224982 - Implement zoom reset
unc0rr
parents: 2328
diff changeset
    86
pkbd^[4]:= ord(wheelDown);
d62b1f224982 - Implement zoom reset
unc0rr
parents: 2328
diff changeset
    87
pkbd^[5]:= ord(wheelUp);
d62b1f224982 - Implement zoom reset
unc0rr
parents: 2328
diff changeset
    88
wheelUp:= false;
d62b1f224982 - Implement zoom reset
unc0rr
parents: 2328
diff changeset
    89
wheelDown:= false;
2152
a2811690da1b Patch by koda:
unc0rr
parents: 2008
diff changeset
    90
2379
d62b1f224982 - Implement zoom reset
unc0rr
parents: 2328
diff changeset
    91
// now process strokes
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
    92
for i:= 1 to cKeyMaxIndex do
947
4e0c3ad89483 - 't' key for entering chat message
unc0rr
parents: 883
diff changeset
    93
if CurrentBinds[i][0] <> #0 then
4e0c3ad89483 - 't' key for entering chat message
unc0rr
parents: 883
diff changeset
    94
	begin
4e0c3ad89483 - 't' key for entering chat message
unc0rr
parents: 883
diff changeset
    95
	if (i > 3) and (pkbd^[i] <> 0) then KbdKeyPressed:= true;
4e0c3ad89483 - 't' key for entering chat message
unc0rr
parents: 883
diff changeset
    96
	if (tkbd[i] = 0) and (pkbd^[i] <> 0) then ParseCommand(CurrentBinds[i], Trusted)
4e0c3ad89483 - 't' key for entering chat message
unc0rr
parents: 883
diff changeset
    97
	else if (CurrentBinds[i][1] = '+')
948
5d49a92c240a Fix chat behavior
unc0rr
parents: 947
diff changeset
    98
			and (pkbd^[i] = 0)
5d49a92c240a Fix chat behavior
unc0rr
parents: 947
diff changeset
    99
			and (tkbd[i] <> 0) then
947
4e0c3ad89483 - 't' key for entering chat message
unc0rr
parents: 883
diff changeset
   100
			begin
4e0c3ad89483 - 't' key for entering chat message
unc0rr
parents: 883
diff changeset
   101
			s:= CurrentBinds[i];
4e0c3ad89483 - 't' key for entering chat message
unc0rr
parents: 883
diff changeset
   102
			s[1]:= '-';
4e0c3ad89483 - 't' key for entering chat message
unc0rr
parents: 883
diff changeset
   103
			ParseCommand(s, Trusted)
4e0c3ad89483 - 't' key for entering chat message
unc0rr
parents: 883
diff changeset
   104
			end;
4e0c3ad89483 - 't' key for entering chat message
unc0rr
parents: 883
diff changeset
   105
	tkbd[i]:= pkbd^[i]
4e0c3ad89483 - 't' key for entering chat message
unc0rr
parents: 883
diff changeset
   106
	end
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
   107
end;
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
   108
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
   109
procedure ResetKbd;
371
731ad6d27bd1 integer -> LongInt
unc0rr
parents: 351
diff changeset
   110
var i, t: LongInt;
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
   111
    pkbd: PByteArray;
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
   112
begin
2171
8208946331ba Smaxx refactor of LoadImage to use flags, iphone changes by koda (mostly use of rgba instead of rgb)
nemo
parents: 2163
diff changeset
   113
2152
a2811690da1b Patch by koda:
unc0rr
parents: 2008
diff changeset
   114
{$IFDEF SDL13}
a2811690da1b Patch by koda:
unc0rr
parents: 2008
diff changeset
   115
pkbd:= PByteArray(SDL_GetKeyboardState(@i));
a2811690da1b Patch by koda:
unc0rr
parents: 2008
diff changeset
   116
{$ELSE}
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
   117
pkbd:= PByteArray(SDL_GetKeyState(@i));
2152
a2811690da1b Patch by koda:
unc0rr
parents: 2008
diff changeset
   118
{$ENDIF}
109
ab0340f580c2 - Initialize translations earlier
unc0rr
parents: 42
diff changeset
   119
TryDo(i < cKeyMaxIndex, 'SDL keys number is more than expected (' + inttostr(i) + ')', true);
2171
8208946331ba Smaxx refactor of LoadImage to use flags, iphone changes by koda (mostly use of rgba instead of rgb)
nemo
parents: 2163
diff changeset
   120
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
   121
for t:= 0 to Pred(i) do
2284
bd091b6b128d - Remove one AddProgress call
unc0rr
parents: 2222
diff changeset
   122
    tkbd[i]:= pkbd^[i]
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
   123
end;
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
   124
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
   125
procedure InitKbdKeyTable;
371
731ad6d27bd1 integer -> LongInt
unc0rr
parents: 351
diff changeset
   126
var i, t: LongInt;
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
   127
    s: string[15];
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
   128
begin
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
   129
KeyNames[1]:= 'mousel';
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
   130
KeyNames[2]:= 'mousem';
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
   131
KeyNames[3]:= 'mouser';
2379
d62b1f224982 - Implement zoom reset
unc0rr
parents: 2328
diff changeset
   132
KeyNames[4]:= 'wheelup';
d62b1f224982 - Implement zoom reset
unc0rr
parents: 2328
diff changeset
   133
KeyNames[5]:= 'wheeldown';
d62b1f224982 - Implement zoom reset
unc0rr
parents: 2328
diff changeset
   134
d62b1f224982 - Implement zoom reset
unc0rr
parents: 2328
diff changeset
   135
for i:= 6 to cKeyMaxIndex do
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
   136
    begin
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
   137
    s:= SDL_GetKeyName(i);
2379
d62b1f224982 - Implement zoom reset
unc0rr
parents: 2328
diff changeset
   138
	//addfilelog(inttostr(i) + ' ' + s);
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
   139
    if s = 'unknown key' then KeyNames[i]:= ''
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
   140
       else begin
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
   141
       for t:= 1 to Length(s) do
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
   142
           if s[t] = ' ' then s[t]:= '_';
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
   143
       KeyNames[i]:= s
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
   144
       end;
167
805fa9a27e9e "Trusted" binds
unc0rr
parents: 161
diff changeset
   145
    end;
805fa9a27e9e "Trusted" binds
unc0rr
parents: 161
diff changeset
   146
2379
d62b1f224982 - Implement zoom reset
unc0rr
parents: 2328
diff changeset
   147
DefaultBinds[ 27]:= 'quit';
d62b1f224982 - Implement zoom reset
unc0rr
parents: 2328
diff changeset
   148
DefaultBinds[ 96]:= 'history';
d62b1f224982 - Implement zoom reset
unc0rr
parents: 2328
diff changeset
   149
DefaultBinds[127]:= 'rotmask';
d62b1f224982 - Implement zoom reset
unc0rr
parents: 2328
diff changeset
   150
d62b1f224982 - Implement zoom reset
unc0rr
parents: 2328
diff changeset
   151
DefaultBinds[KeyNameToCode('0')]:= '+volup';
d62b1f224982 - Implement zoom reset
unc0rr
parents: 2328
diff changeset
   152
DefaultBinds[KeyNameToCode('9')]:= '+voldown';
d62b1f224982 - Implement zoom reset
unc0rr
parents: 2328
diff changeset
   153
DefaultBinds[KeyNameToCode('c')]:= 'capture';
d62b1f224982 - Implement zoom reset
unc0rr
parents: 2328
diff changeset
   154
DefaultBinds[KeyNameToCode('h')]:= 'findhh';
d62b1f224982 - Implement zoom reset
unc0rr
parents: 2328
diff changeset
   155
DefaultBinds[KeyNameToCode('p')]:= 'pause';
d62b1f224982 - Implement zoom reset
unc0rr
parents: 2328
diff changeset
   156
DefaultBinds[KeyNameToCode('s')]:= '+speedup';
d62b1f224982 - Implement zoom reset
unc0rr
parents: 2328
diff changeset
   157
DefaultBinds[KeyNameToCode('t')]:= 'chat';
d62b1f224982 - Implement zoom reset
unc0rr
parents: 2328
diff changeset
   158
DefaultBinds[KeyNameToCode('y')]:= 'confirm';
1051
dfdd5dfe97d4 Enable fullscreen switching back, now it's bound on F12
unc0rr
parents: 1022
diff changeset
   159
dfdd5dfe97d4 Enable fullscreen switching back, now it's bound on F12
unc0rr
parents: 1022
diff changeset
   160
DefaultBinds[KeyNameToCode('f12')]:= 'fullscr';
dfdd5dfe97d4 Enable fullscreen switching back, now it's bound on F12
unc0rr
parents: 1022
diff changeset
   161
167
805fa9a27e9e "Trusted" binds
unc0rr
parents: 161
diff changeset
   162
SetDefaultBinds
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
   163
end;
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
   164
167
805fa9a27e9e "Trusted" binds
unc0rr
parents: 161
diff changeset
   165
procedure SetBinds(var binds: TBinds);
805fa9a27e9e "Trusted" binds
unc0rr
parents: 161
diff changeset
   166
begin
805fa9a27e9e "Trusted" binds
unc0rr
parents: 161
diff changeset
   167
CurrentBinds:= binds
805fa9a27e9e "Trusted" binds
unc0rr
parents: 161
diff changeset
   168
end;
805fa9a27e9e "Trusted" binds
unc0rr
parents: 161
diff changeset
   169
805fa9a27e9e "Trusted" binds
unc0rr
parents: 161
diff changeset
   170
procedure SetDefaultBinds;
805fa9a27e9e "Trusted" binds
unc0rr
parents: 161
diff changeset
   171
begin
805fa9a27e9e "Trusted" binds
unc0rr
parents: 161
diff changeset
   172
CurrentBinds:= DefaultBinds
805fa9a27e9e "Trusted" binds
unc0rr
parents: 161
diff changeset
   173
end;
805fa9a27e9e "Trusted" binds
unc0rr
parents: 161
diff changeset
   174
948
5d49a92c240a Fix chat behavior
unc0rr
parents: 947
diff changeset
   175
procedure FreezeEnterKey;
5d49a92c240a Fix chat behavior
unc0rr
parents: 947
diff changeset
   176
begin
5d49a92c240a Fix chat behavior
unc0rr
parents: 947
diff changeset
   177
tkbd[13]:= 1;
5d49a92c240a Fix chat behavior
unc0rr
parents: 947
diff changeset
   178
tkbd[271]:= 1
5d49a92c240a Fix chat behavior
unc0rr
parents: 947
diff changeset
   179
end;
167
805fa9a27e9e "Trusted" binds
unc0rr
parents: 161
diff changeset
   180
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
   181
initialization
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
   182
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 1
diff changeset
   183
end.