|
|
@ -72,6 +72,7 @@ class pfConsoleInputInterface : public plInputInterface |
|
|
|
pfConsole *fConsole; |
|
|
|
pfConsole *fConsole; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
virtual hsBool IHandleCtrlCmd( plCtrlCmd *cmd ) |
|
|
|
virtual hsBool IHandleCtrlCmd( plCtrlCmd *cmd ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if( cmd->fControlCode == B_SET_CONSOLE_MODE ) |
|
|
|
if( cmd->fControlCode == B_SET_CONSOLE_MODE ) |
|
|
@ -99,7 +100,7 @@ class pfConsoleInputInterface : public plInputInterface |
|
|
|
|
|
|
|
|
|
|
|
public: |
|
|
|
public: |
|
|
|
|
|
|
|
|
|
|
|
pfConsoleInputInterface( pfConsole *console )
|
|
|
|
pfConsoleInputInterface( pfConsole *console ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
fConsole = console;
|
|
|
|
fConsole = console;
|
|
|
|
SetEnabled( true ); // Always enabled
|
|
|
|
SetEnabled( true ); // Always enabled
|
|
|
@ -126,12 +127,19 @@ class pfConsoleInputInterface : public plInputInterface |
|
|
|
virtual hsBool InterpretInputEvent( plInputEventMsg *pMsg ) |
|
|
|
virtual hsBool InterpretInputEvent( plInputEventMsg *pMsg ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
plKeyEventMsg *keyMsg = plKeyEventMsg::ConvertNoRef( pMsg ); |
|
|
|
plKeyEventMsg *keyMsg = plKeyEventMsg::ConvertNoRef( pMsg ); |
|
|
|
|
|
|
|
if( keyMsg != nil ) |
|
|
|
// HACK for now to let runlock work always (until we can think of a more generic and good way of doing this)
|
|
|
|
|
|
|
|
if( keyMsg != nil && keyMsg->GetKeyCode() != KEY_CAPSLOCK ) |
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
if( fConsole->fMode ) |
|
|
|
if( fConsole->fMode ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
// If this is a character input, do not accept the codes (yes, the code) that will toggle
|
|
|
|
|
|
|
|
// the console--that's handled elsewhere...
|
|
|
|
|
|
|
|
if ( keyMsg->GetKeyChar() ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
const plKeyBinding* keyb = fControlMap->FindBinding( B_SET_CONSOLE_MODE ); |
|
|
|
|
|
|
|
if ( keyb->GetKey1().fKey == keyMsg->GetKeyCode() ) |
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
fConsole->IHandleKey( keyMsg ); |
|
|
|
fConsole->IHandleKey( keyMsg ); |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|