aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/keyboard.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/common/keyboard.h b/common/keyboard.h
index 6a4445728f..cf595d4dd8 100644
--- a/common/keyboard.h
+++ b/common/keyboard.h
@@ -249,9 +249,15 @@ struct KeyState {
*/
byte flags;
- KeyState(KeyCode kc = KEYCODE_INVALID, uint16 asc = 0, byte f = 0) {
+ KeyState(KeyCode kc = KEYCODE_INVALID) {
keycode = kc;
- ascii = asc ? asc : (uint16)kc;
+ ascii = (uint16)kc;
+ flags = 0;
+ }
+
+ KeyState(KeyCode kc, uint16 asc, byte f = 0) {
+ keycode = kc;
+ ascii = asc;
flags = f;
}