-Changed it to only toggle the console with ESCAPE when you're in the console,
so binding toggleconsole to a normal key wont toggle it while typing.
-Changed the panic console key to shift-escape since ctrl-escape open the start
menu.
Feel free to test it.
@ETG: since I can probably only reach you this way: it is intended that the console
toggle key now appears in the console input line and is also send to e.g. message.
This is because the color tag ^ key opens the console on some keyboard layouts and
couldnt be typed in otherwise.
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5408
d7cf8633-e32d-0410-b094-
e92efae38249
{
#if 0
#define USERPLAYING() ( !key_consoleactive && key_dest == key_game && (cls.state == ca_connected && cls.signon == SIGNONS) )
{
#if 0
#define USERPLAYING() ( !key_consoleactive && key_dest == key_game && (cls.state == ca_connected && cls.signon == SIGNONS) )
-//#define CONSOLEKEY() (key_consoleactive && !consolekeys[key])
-#define CONSOLEKEY() ( key_dest == key_console)
+ static qboolean shift_down = false;
// get key binding
bind = keybindings[ key_bmap ][ key ];
// get key binding
bind = keybindings[ key_bmap ][ key ];
key_repeats[ key ] = 0;
}
key_repeats[ key ] = 0;
}
- if( key == K_CTRL ) {
- ctrl_down = down;
+ if( key == K_SHIFT ) {
+ shift_down = down;
// handle ESCAPE specially, so unbinding wont help
if( key == K_ESCAPE ) {
// ctrl-escape is a safety measure for users who cant toggle the console otherwise
// handle ESCAPE specially, so unbinding wont help
if( key == K_ESCAPE ) {
// ctrl-escape is a safety measure for users who cant toggle the console otherwise
+ if( shift_down || key_consoleactive ) {
Con_ToggleConsole_f();
return;
}
Con_ToggleConsole_f();
return;
}
+ if( key_consoleactive ) {
+ Key_Console( key, ascii );
+ return;
+ }
+
if (bind && !strncmp( bind, "toggleconsole", strlen( "toggleconsole" ) ) )
{
Cbuf_AddText( bind );
if (bind && !strncmp( bind, "toggleconsole", strlen( "toggleconsole" ) ) )
{
Cbuf_AddText( bind );
}
// either console or game state key functions
}
// either console or game state key functions
- if( key_consoleactive ) {
- Key_Console( key, ascii );
- } else {
- switch (key_dest) {
- case key_message:
- Key_Message( key, ascii );
- break;
- case key_menu:
- MR_Keydown( key, ascii );
- break;
- case key_game:
- // unbound key
- break;
- default:
- Sys_Error( "Bad key_dest" );
- }
+ switch (key_dest) {
+ case key_message:
+ Key_Message( key, ascii );
+ break;
+ case key_menu:
+ MR_Keydown( key, ascii );
+ break;
+ case key_game:
+ // unbound key
+ break;
+ default:
+ Sys_Error( "Bad key_dest" );