From da1ca0d91c8e1890a13f8ccf40e0fb1059914105 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Sat, 27 Aug 2011 16:24:54 -0400 Subject: [PATCH] Fix the bugs I introduced by accidentally merging my own pull request. --- Sources/Plasma/FeatureLib/pfConsole/pfConsole.cpp | 9 --------- .../Plasma/PubUtilLib/plInputCore/plInputInterface.cpp | 7 +++++-- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/Sources/Plasma/FeatureLib/pfConsole/pfConsole.cpp b/Sources/Plasma/FeatureLib/pfConsole/pfConsole.cpp index 6ab878f1..e4c0b605 100644 --- a/Sources/Plasma/FeatureLib/pfConsole/pfConsole.cpp +++ b/Sources/Plasma/FeatureLib/pfConsole/pfConsole.cpp @@ -131,15 +131,6 @@ class pfConsoleInputInterface : public plInputInterface { 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; } diff --git a/Sources/Plasma/PubUtilLib/plInputCore/plInputInterface.cpp b/Sources/Plasma/PubUtilLib/plInputCore/plInputInterface.cpp index 92c6a89c..5a338f6c 100644 --- a/Sources/Plasma/PubUtilLib/plInputCore/plInputInterface.cpp +++ b/Sources/Plasma/PubUtilLib/plInputCore/plInputInterface.cpp @@ -132,8 +132,6 @@ hsBool plInputInterface::ProcessKeyBindings( plInputEventMsg *msg ) plKeyEventMsg *keyMsg = plKeyEventMsg::ConvertNoRef( msg ); if( keyMsg == nil ) return false; - if ( keyMsg->GetKeyChar()) - return false; /// We might have controls that are currently enabled that are triggered in part by @@ -272,6 +270,11 @@ hsBool plInputInterface::ProcessKeyBindings( plInputEventMsg *msg ) } } + // Still here? Only proces bound keys for KEYDOWNS. + // We'll pretend to process CHARs so they don't get sent on... + if ( keyMsg->GetKeyChar() ) + return true; + /// OK, generate the message to send plCtrlCmd *pCmd = TRACKED_NEW plCtrlCmd( this ); pCmd->fControlCode = binding->GetCode();