-
-typedef enum {key_game, key_console, key_message, key_menu} keydest_t;
-
-extern keydest_t key_dest;
-extern char *keybindings[256];
-extern int key_repeats[256];
-extern int key_count; // incremented every key event
-extern int key_lastpress;
-
-void Key_Event (int key, qboolean down);
-void Key_Init (void);
-void Key_WriteBindings (QFile *f);
-void Key_SetBinding (int keynum, char *binding);
+typedef enum { key_game, key_message, key_menu } keydest_t;
+
+extern char *keybindings[8][1024];
+extern char key_lines[32][256];
+extern int key_linepos;
+extern int edit_line;
+extern int history_line;
+extern void Key_ClearEditLine(int edit_line);
+extern qboolean chat_team;
+extern char chat_buffer[256];
+extern unsigned int chat_bufferlen;
+
+// key_consoleactive bits
+// user wants console (halfscreen)
+#define KEY_CONSOLEACTIVE_USER 1
+// console forced because there's nothing else active (fullscreen)
+#define KEY_CONSOLEACTIVE_FORCED 4
+extern int key_consoleactive;
+extern keydest_t key_dest;
+
+void Key_WriteBindings(qfile_t *f);
+void Key_Init(void);
+void Key_Init_Cvars(void);
+void Key_Event(int key, char ascii, qboolean down);