![]() |
DarkPlaces
Game engine based on the Quake 1 engine by id Software, developed by LadyHavoc
|
|
Go to the source code of this file.
Macros | |
#define | KEY_CONSOLEACTIVE_FORCED 4 |
#define | KEY_CONSOLEACTIVE_USER 1 |
#define | MAX_KEY_BINDS 0xAC00 |
#define | TINYSTR_LEN 4 |
Functions | |
int | Key_AddChar (int unicode, qbool is_console) |
int | Key_ClearEditLine (qbool is_console) |
void | Key_Event (int key, int ascii, qbool down) |
void | Key_EventQueue_Block (void) |
void | Key_EventQueue_Unblock (void) |
void | Key_FindKeysForCommand (const char *command, int *keys, int numkeys, int bindmap) |
const char * | Key_GetBind (int key, int bindmap) |
void | Key_GetBindMap (int *fg, int *bg) |
void | Key_Init (void) |
void | Key_Init_Cvars (void) |
const char * | Key_KeynumToString (int keynum, char *buf, size_t buflength) |
int | Key_Parse_CommonKeys (cmd_state_t *cmd, qbool is_console, int key, int unicode) |
void | Key_ReleaseAll (void) |
void | Key_ReleaseAll_f (cmd_state_t *cmd) |
qbool | Key_SetBinding (int keynum, int bindmap, const char *binding) |
qbool | Key_SetBindMap (int fg, int bg) |
void | Key_Shutdown (void) |
int | Key_StringToKeynum (const char *str) |
void | Key_WriteBindings (qfile_t *f) |
Variables | |
char | chat_buffer [MAX_INPUTLINE] |
int | chat_bufferpos |
signed char | chat_mode |
int | key_consoleactive |
keydest_t | key_dest |
qbool | key_insert |
char | key_line [MAX_INPUTLINE] |
int | key_linepos |
char * | keybindings [MAX_BINDMAPS][MAX_KEYS] |
#define KEY_CONSOLEACTIVE_FORCED 4 |
Definition at line 382 of file keys.h.
Referenced by Key_Event(), SCR_DrawConsole(), SCR_DrawScreen(), and SCR_SetUpToDrawConsole().
#define KEY_CONSOLEACTIVE_USER 1 |
Definition at line 380 of file keys.h.
Referenced by Con_ToggleConsole_f(), IN_Move(), IN_Move_TouchScreen_Quake(), IN_Move_TouchScreen_SteelStorm(), Key_Event(), and SCR_SetUpToDrawConsole().
#define TINYSTR_LEN 4 |
Definition at line 46 of file keys.h.
Referenced by Key_PrintBindList(), Key_WriteBindings(), M_Keys_Draw(), M_Keys_Key(), and VM_keynumtostring().
enum keydest_t |
enum keynum_t |
Definition at line 51 of file keys.h.
Definition at line 703 of file keys.c.
References buf, chat_buffer, chat_bufferpos, int(), key_insert, key_line, key_linepos, MAX_INPUTLINE, strlen(), u8_bytelen(), and u8_fromchar().
Referenced by Key_Console(), and Key_Message().
Definition at line 668 of file keys.c.
References chat_buffer, and key_line.
Referenced by Key_Console(), Key_Init(), Key_Message(), and Key_Parse_CommonKeys().
Definition at line 1836 of file keys.c.
References Cbuf_AddText(), Cbuf_InsertText(), CL_Video_KeyEvent(), cl_videoplaying, CL_VM_InputEvent(), cmd(), cmd_local, con_closeontoggleconsole, Con_DPrintf(), Con_Printf(), Con_ToggleConsole_f(), developer_insane, events_blocked, GAME_BLOODOMNICIDE, gamemode, cvar_t::integer, K_ESCAPE, K_F1, K_F12, K_SHIFT, key_bmap, key_bmap2, Key_Console(), key_console, key_consoleactive, KEY_CONSOLEACTIVE_FORCED, KEY_CONSOLEACTIVE_USER, key_dest, Key_EventQueue_Add(), key_game, key_linepos, key_menu, key_menu_grabbed, Key_Message(), key_message, key_void, keybindings, keydown, MAX_KEYS, min, MR_KeyEvent, MR_ToggleMenu, STRING_COLOR_TAG, strlen(), Sys_CheckParm(), tbl_keyascii, tbl_keydest, and va().
Referenced by Key_EventQueue_Unblock(), Key_ReleaseAll(), Sys_SDL_HandleEvents(), VID_KeyEventForButton(), VID_TouchscreenArea(), and VID_TouchscreenCursor().
Definition at line 1819 of file keys.c.
References events_blocked.
Definition at line 1825 of file keys.c.
References eventqueue, eventqueue_idx, events_blocked, i, and Key_Event().
Definition at line 1760 of file keys.c.
References b, count, Key_GetBind(), MAX_BINDMAPS, and MAX_KEYS.
Referenced by M_Keys_Draw(), M_Keys_Key(), and VM_findkeysforcommand().
Definition at line 1740 of file keys.c.
References key_bmap, key_bmap2, keybindings, MAX_BINDMAPS, MAX_KEYS, and NULL.
Referenced by Key_FindKeysForCommand(), and VM_getkeybind().
Definition at line 1710 of file keys.c.
References CF_CLIENT, Cmd_AddCommand(), con_closeontoggleconsole, Cvar_RegisterVariable(), Key_Bind_f(), Key_BindList_f(), Key_ClearEditLine(), Key_History_f(), Key_History_Init(), Key_In_Bind_f(), Key_In_BindList_f(), Key_In_Bindmap_f(), Key_In_Unbind_f(), key_linepos, Key_ReleaseAll_f(), Key_Unbind_f(), and Key_Unbindall_f().
Referenced by CL_Init().
const char * Key_KeynumToString | ( | int | keynum, |
char * | buf, | ||
size_t | buflength ) |
Definition at line 1383 of file keys.c.
References keynames, keyname_t::keynum, keyname_t::name, and u8_fromchar().
Referenced by Key_PrintBindList(), Key_WriteBindings(), M_Keys_Draw(), M_Keys_Key(), and VM_keynumtostring().
int Key_Parse_CommonKeys | ( | cmd_state_t * | cmd, |
qbool | is_console, | ||
int | key, | ||
int | unicode ) |
Definition at line 750 of file keys.c.
References CF_CLIENT, CF_SERVER, chat_buffer, chat_bufferpos, cmd(), con_backscroll, Con_CompleteCommandLine(), Con_Printf(), CON_TEXTSIZE, cvar(), Cvar_VariableString(), cvars_all, dp_strlcpy, i, int(), K_BACKSPACE, K_DEL, K_END, K_HOME, K_INS, K_KP_DEL, K_KP_END, K_KP_HOME, K_KP_INS, K_KP_LEFTARROW, K_KP_RIGHTARROW, K_LEFTARROW, K_RIGHTARROW, K_TAB, Key_ClearEditLine(), key_insert, key_line, key_linepos, KM_CTRL, KM_NONE, KM_SHIFT, MAX_INPUTLINE, STRING_COLOR_RGB_TAG_CHAR, STRING_COLOR_TAG, strlen(), Sys_SDL_GetClipboardData(), u8_bytelen(), u8_charidx(), u8_prevbyte(), and Z_Free.
Referenced by Key_Console(), and Key_Message().
Definition at line 2075 of file keys.c.
References eventqueue_idx, Key_Event(), keydown, and MAX_KEYS.
Referenced by Key_ReleaseAll_f(), VID_Restart_f(), and VID_Start().
void Key_ReleaseAll_f | ( | cmd_state_t * | cmd | ) |
Definition at line 1409 of file keys.c.
References keybindings, MAX_BINDMAPS, MAX_KEYS, NULL, strlen(), Z_Free, and Z_Malloc.
Referenced by Key_Bind_f(), Key_In_Bind_f(), Key_In_Unbind_f(), Key_Unbind_f(), Key_Unbindall_f(), M_UnbindCommand(), and VM_setkeybind().
Definition at line 1443 of file keys.c.
References key_bmap, key_bmap2, and MAX_BINDMAPS.
Referenced by VM_setbindmaps().
Definition at line 1735 of file keys.c.
References Key_History_Shutdown().
Referenced by CL_Shutdown().
int Key_StringToKeynum | ( | const char * | str | ) |
Definition at line 1354 of file keys.c.
References int(), keynames, keyname_t::keynum, keyname_t::name, and u8_getnchar.
Referenced by Key_Bind_f(), Key_In_Bind_f(), Key_In_Unbind_f(), Key_Unbind_f(), and VM_stringtokeynum().
void Key_WriteBindings | ( | qfile_t * | f | ) |
Definition at line 1681 of file keys.c.
References Cmd_QuoteString(), f, FS_Printf(), i, int(), Key_KeynumToString(), keybindings, MAX_BINDMAPS, MAX_INPUTLINE, and TINYSTR_LEN.
Referenced by Host_SaveConfig().
|
extern |
Definition at line 700 of file keys.c.
Referenced by Con_CompleteCommandLine(), Con_DrawInput(), Con_MsgCmdMode(), Key_AddChar(), Key_ClearEditLine(), Key_Message(), and Key_Parse_CommonKeys().
|
extern |
Definition at line 701 of file keys.c.
Referenced by Con_CompleteCommandLine(), Con_DrawInput(), Con_DrawNotify(), Con_MsgCmdMode(), Key_AddChar(), Key_Message(), and Key_Parse_CommonKeys().
|
extern |
Definition at line 699 of file keys.c.
Referenced by Con_DrawInput(), Con_MsgCmdMode(), and Key_Message().
|
extern |
Definition at line 38 of file keys.c.
Referenced by CL_Input(), CL_SendMove(), CL_TimeDemo_f(), Con_DrawInput(), Con_ToggleConsole_f(), IN_Move(), IN_Move_TouchScreen_Quake(), IN_Move_TouchScreen_SteelStorm(), Key_Event(), SCR_DrawConsole(), SCR_DrawScreen(), SCR_SetUpToDrawConsole(), Sys_SDL_HandleEvents(), VID_ApplyDisplayMode_c(), VM_CL_getmousepos(), and VM_M_getmousepos().
|
extern |
Definition at line 37 of file keys.c.
Referenced by CL_Input(), CL_SendMove(), CL_TimeDemo_f(), CL_ToggleMenu_Hook(), CL_VM_DrawHud(), CL_VM_UpdateView(), Con_DrawNotify(), Con_MsgCmdMode(), IN_Move(), IN_Move_TouchScreen_Quake(), IN_Move_TouchScreen_SteelStorm(), Key_Event(), Key_Message(), M_Demo_Key(), M_Draw(), M_Load_Key(), M_Main_Key(), M_Menu_Credits_f(), M_Menu_Demos_f(), M_Menu_GameOptions_f(), M_Menu_Help_f(), M_Menu_Keys_f(), M_Menu_LanConfig_f(), M_Menu_Load_f(), M_Menu_Main_f(), M_Menu_ModList_f(), M_Menu_MultiPlayer_f(), M_Menu_Options_ColorControl_f(), M_Menu_Options_Effects_f(), M_Menu_Options_f(), M_Menu_Options_Graphics_f(), M_Menu_Quit_f(), M_Menu_Reset_f(), M_Menu_Save_f(), M_Menu_ServerList_f(), M_Menu_Setup_f(), M_Menu_SinglePlayer_f(), M_Menu_Transfusion_Episode_f(), M_Menu_Transfusion_Skill_f(), M_Menu_Video_f(), M_Options_Key(), M_Quit_Key(), M_Save_Key(), M_Shutdown(), M_SinglePlayer_Key(), M_ToggleMenu(), M_Transfusion_Skill_Key(), MP_Shutdown(), MVM_error_cmd(), NetConn_ClientParsePacket(), NetConn_ConnectionEstablished(), SCR_CheckDrawCenterString(), SCR_DrawScreen(), SCR_SetUpToDrawConsole(), Sys_SDL_HandleEvents(), VID_ApplyDisplayMode_c(), VM_CL_getmousepos(), VM_M_getkeydest(), VM_M_getmousepos(), and VM_M_setkeydest().
|
extern |
Definition at line 36 of file keys.c.
Referenced by Con_DrawInput(), Key_AddChar(), and Key_Parse_CommonKeys().
|
extern |
Definition at line 34 of file keys.c.
Referenced by Con_CompleteCommandLine(), Con_DrawInput(), Key_AddChar(), Key_ClearEditLine(), Key_Console(), Key_History_Down(), Key_History_Find_All(), Key_History_Find_Backwards(), Key_History_Find_Forwards(), Key_History_First(), Key_History_Get_foundCommand(), Key_History_Last(), Key_History_Push(), Key_History_Up(), and Key_Parse_CommonKeys().
|
extern |
Definition at line 35 of file keys.c.
Referenced by Con_CompleteCommandLine(), Con_DrawInput(), Key_AddChar(), Key_Console(), Key_Event(), Key_History_Down(), Key_History_First(), Key_History_Get_foundCommand(), Key_History_Last(), Key_History_Up(), Key_Init(), and Key_Parse_CommonKeys().
|
extern |
Definition at line 39 of file keys.c.
Referenced by Key_Bind_f(), Key_Event(), Key_GetBind(), Key_In_Bind_f(), Key_PrintBindList(), Key_SetBinding(), Key_Unbindall_f(), Key_WriteBindings(), and M_UnbindCommand().