2
3
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-14 10:37:41 -04:00

Include the vkey code with the key character

This commit is contained in:
2011-08-27 14:22:53 -04:00
parent e3c65ac817
commit a75220a409
2 changed files with 17 additions and 5 deletions

View File

@ -72,6 +72,7 @@ class pfConsoleInputInterface : public plInputInterface
pfConsole *fConsole;
virtual hsBool IHandleCtrlCmd( plCtrlCmd *cmd )
{
if( cmd->fControlCode == B_SET_CONSOLE_MODE )
@ -99,7 +100,7 @@ class pfConsoleInputInterface : public plInputInterface
public:
pfConsoleInputInterface( pfConsole *console )
pfConsoleInputInterface( pfConsole *console )
{
fConsole = console;
SetEnabled( true ); // Always enabled
@ -126,12 +127,19 @@ class pfConsoleInputInterface : public plInputInterface
virtual hsBool InterpretInputEvent( plInputEventMsg *pMsg )
{
plKeyEventMsg *keyMsg = plKeyEventMsg::ConvertNoRef( pMsg );
// 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( keyMsg != nil )
{
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 );
return true;
}