X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=keys.c;h=e93f83ac95504136e3605ce7a1ba0a15ae0faf67;hb=e47d52795a830dd0bee4f3c2dd83b4540128f0d8;hp=6022f6bbfe175880eb4b0ada5510eeb784c82daf;hpb=15ef197732d17f167c1a1b41c7e28d65cd4cad30;p=xonotic%2Fdarkplaces.git diff --git a/keys.c b/keys.c index 6022f6bb..e93f83ac 100644 --- a/keys.c +++ b/keys.c @@ -1198,7 +1198,7 @@ static void Key_Message (int key, int ascii) { char vabuf[1024]; - if (key == K_ENTER || ascii == 10 || ascii == 13) + if (key == K_ENTER || key == K_KP_ENTER || ascii == 10 || ascii == 13) { if(chat_mode < 0) Cmd_ExecuteString(chat_buffer, src_command, true); // not Cbuf_AddText to allow semiclons in args; however, this allows no variables then. Use aliases! @@ -1626,6 +1626,7 @@ Key_Init (void) Cmd_AddCommand ("in_unbind", Key_In_Unbind_f, "removes command on the specified key in the selected bindmap"); Cmd_AddCommand ("in_bindlist", Key_In_BindList_f, "bindlist: displays bound keys for all bindmaps, or the given bindmap"); Cmd_AddCommand ("in_bindmap", Key_In_Bindmap_f, "selects active foreground and background (used only if a key is not bound in the foreground) bindmaps for typing"); + Cmd_AddCommand ("in_releaseall", Key_ReleaseAll, "releases all currently pressed keys (debug command)"); Cmd_AddCommand ("bind", Key_Bind_f, "binds a command to the specified key in bindmap 0"); Cmd_AddCommand ("unbind", Key_Unbind_f, "removes a command on the specified key in bindmap 0"); @@ -1917,7 +1918,7 @@ Key_Event (int key, int ascii, qboolean down) { if (down && con_closeontoggleconsole.integer && bind && !strncmp(bind, "toggleconsole", strlen("toggleconsole")) && ascii != STRING_COLOR_TAG) { - Con_ToggleConsole_f (); + Cbuf_AddText("toggleconsole\n"); // Deferred to next frame so we're not sending the text event to the console. tbl_keydest[key] = key_void; // key release should go nowhere (especially not to key_menu or key_game) return; } @@ -1989,14 +1990,3 @@ Key_ReleaseAll (void) // now all keys are guaranteed down (once the event queue is unblocked) // and only future events count } - -/* -=================== -Key_ClearStates -=================== -*/ -void -Key_ClearStates (void) -{ - memset(keydown, 0, sizeof(keydown)); -}