gui: fix hardware keyboard

- Power+voldown works again for taking screenshots
- Right shift key isn't stuck until users presses "s"
- Don't use DataManager for local variables
- Simplify handling of Shift keys
- Clean up #includes a bit

Change-Id: Iff0453107beaa336a9c04422b43e92225fdbe069
This commit is contained in:
that
2015-02-01 13:38:35 +01:00
parent c5837f3997
commit f37aec20dd
3 changed files with 64 additions and 73 deletions
+9 -4
View File
@@ -992,17 +992,22 @@ protected:
class HardwareKeyboard
{
public:
HardwareKeyboard(void);
HardwareKeyboard();
virtual ~HardwareKeyboard();
public:
virtual int KeyDown(int key_code);
virtual int KeyUp(int key_code);
virtual int KeyRepeat(void);
// called by the input handler for key events
int KeyDown(int key_code);
int KeyUp(int key_code);
// called by the input handler when holding a key down
int KeyRepeat();
// called by multi-key actions to suppress key-release notifications
void ConsumeKeyRelease(int key);
private:
int mLastKeyChar;
std::set<int> mPressedKeys;
};