-#define KEY_CONSOLEACTIVE_FORCED 2
-extern int key_consoleactive;
-extern keydest_t key_dest;
+#define KEY_CONSOLEACTIVE_FORCED 4
+extern int key_consoleactive;
+extern char *keybindings[MAX_BINDMAPS][MAX_KEYS];
+
+extern int chat_mode; // 0 for say, 1 for say_team, -1 for command
+extern char chat_buffer[MAX_INPUTLINE];
+extern int chat_bufferpos;
+
+int Key_ClearEditLine(qbool is_console);
+void Key_WriteBindings(qfile_t *f);
+void Key_Init(void);
+void Key_Shutdown(void);
+void Key_Init_Cvars(void);
+void Key_Event(int key, int ascii, qbool down);
+void Key_ReleaseAll (void);
+void Key_ReleaseAll_f(cmd_state_t *cmd);
+void Key_EventQueue_Block(void);
+void Key_EventQueue_Unblock(void);
+int Key_AddChar(int unicode, qbool is_console);
+int Key_Parse_CommonKeys(cmd_state_t *cmd, qbool is_console, int key, int unicode);