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
diff --git a/gui/objects.hpp b/gui/objects.hpp
index c95a935..1d20c2a 100644
--- a/gui/objects.hpp
+++ b/gui/objects.hpp
@@ -992,17 +992,22 @@
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;
};