mirror of
https://github.com/dhewm/dhewm3.git
synced 2025-06-01 09:21:58 +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 idConsoleLocal::ProcessEvent( const sysEvent_t *event, bool forceAccept ) {
|
||||||
bool consoleKey;
|
bool consoleKey = false;
|
||||||
consoleKey = event->evType == SE_KEY && ( event->evValue == Sys_GetConsoleKey( false ) || event->evValue == Sys_GetConsoleKey( true ) );
|
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 ID_CONSOLE_LOCK
|
||||||
// If the console's not already down, and we have it turned off, check for ctrl+alt
|
// 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 {
|
} else {
|
||||||
consoleField.Clear();
|
consoleField.Clear();
|
||||||
keyCatching = true;
|
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
|
// if the shift key is down, don't open the console as much
|
||||||
|
// except we used shift+esc.
|
||||||
SetDisplayFraction( 0.2f );
|
SetDisplayFraction( 0.2f );
|
||||||
} else {
|
} else {
|
||||||
SetDisplayFraction( 0.5f );
|
SetDisplayFraction( 0.5f );
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue