mirror of
https://github.com/dhewm/dhewm3.git
synced 2025-01-19 07:51:54 +00:00
Shift+Escape should also open the console
If one doesn't want to fuck around with in_kbd or uses an unsupported keyboard layout.
This commit is contained in:
parent
5c99ff4657
commit
cf8695bb0f
1 changed files with 11 additions and 3 deletions
|
@ -792,8 +792,15 @@ ProcessEvent
|
|||
==============
|
||||
*/
|
||||
bool idConsoleLocal::ProcessEvent( const sysEvent_t *event, bool forceAccept ) {
|
||||
bool consoleKey;
|
||||
consoleKey = event->evType == SE_KEY && ( event->evValue == Sys_GetConsoleKey( false ) || event->evValue == Sys_GetConsoleKey( true ) );
|
||||
bool consoleKey = false;
|
||||
if(event->evType == SE_KEY)
|
||||
{
|
||||
if( event->evValue == Sys_GetConsoleKey( false ) || event->evValue == Sys_GetConsoleKey( true )
|
||||
|| (event->evValue == K_ESCAPE && idKeyInput::IsDown( K_SHIFT )) ) // shift+esc should also open console
|
||||
{
|
||||
consoleKey = true;
|
||||
}
|
||||
}
|
||||
|
||||
#if ID_CONSOLE_LOCK
|
||||
// If the console's not already down, and we have it turned off, check for ctrl+alt
|
||||
|
@ -821,8 +828,9 @@ bool idConsoleLocal::ProcessEvent( const sysEvent_t *event, bool forceAccept ) {
|
|||
} else {
|
||||
consoleField.Clear();
|
||||
keyCatching = true;
|
||||
if ( idKeyInput::IsDown( K_SHIFT ) ) {
|
||||
if ( idKeyInput::IsDown( K_SHIFT ) && event->evValue != K_ESCAPE ) {
|
||||
// if the shift key is down, don't open the console as much
|
||||
// except we used shift+esc.
|
||||
SetDisplayFraction( 0.2f );
|
||||
} else {
|
||||
SetDisplayFraction( 0.5f );
|
||||
|
|
Loading…
Reference in a new issue