1 /* 2 =========================================================================== 3 Copyright (C) 1999-2005 Id Software, Inc. 4 5 This file is part of Quake III Arena source code. 6 7 Quake III Arena source code is free software; you can redistribute it 8 and/or modify it under the terms of the GNU General Public License as 9 published by the Free Software Foundation; either version 2 of the License, 10 or (at your option) any later version. 11 12 Quake III Arena source code is distributed in the hope that it will be 13 useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 GNU General Public License for more details. 16 17 You should have received a copy of the GNU General Public License 18 along with Quake III Arena source code; if not, write to the Free Software 19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 20 =========================================================================== 21 */ 22 #include "keycodes.h" 23 24 typedef struct { 25 qboolean down; 26 int repeats; // if > 1, it is autorepeating 27 char *binding; 28 } qkey_t; 29 30 extern qboolean key_overstrikeMode; 31 extern qkey_t keys[MAX_KEYS]; 32 33 // NOTE TTimo the declaration of field_t and Field_Clear is now in qcommon/qcommon.h 34 void Field_KeyDownEvent( field_t *edit, int key ); 35 void Field_CharEvent( field_t *edit, int ch ); 36 void Field_Draw( field_t *edit, int x, int y, int width, qboolean showCursor, qboolean noColorEscape ); 37 void Field_BigDraw( field_t *edit, int x, int y, int width, qboolean showCursor, qboolean noColorEscape ); 38 39 #define COMMAND_HISTORY 32 40 extern field_t historyEditLines[COMMAND_HISTORY]; 41 42 extern field_t g_consoleField; 43 extern field_t chatField; 44 extern int anykeydown; 45 extern qboolean chat_team; 46 extern int chat_playerNum; 47 48 void Key_WriteBindings( fileHandle_t f ); 49 void Key_SetBinding( int keynum, const char *binding ); 50 char *Key_GetBinding( int keynum ); 51 qboolean Key_IsDown( int keynum ); 52 qboolean Key_GetOverstrikeMode( void ); 53 void Key_SetOverstrikeMode( qboolean state ); 54 void Key_ClearStates( void ); 55 int Key_GetKey(const char *binding); 56