From 556c5f4f5e1d1bc8a61913e0ae84408d357e5633 Mon Sep 17 00:00:00 2001 From: MatMoul Date: Sat, 29 Oct 2016 13:35:55 +0200 Subject: [PATCH] Type tilde --- src/classes/Keyboard.cpp | 4 ++-- src/classes/Keyboard.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/classes/Keyboard.cpp b/src/classes/Keyboard.cpp index 4ed667b..4c668bf 100644 --- a/src/classes/Keyboard.cpp +++ b/src/classes/Keyboard.cpp @@ -156,7 +156,7 @@ bool Keyboard::getKeyAddress(Key key, KeyAddress &keyAddress) { case Key::tab: keyAddress.id = 0x2b; break; case Key::space: keyAddress.id = 0x2c; break; case Key::apostrophe: keyAddress.id = 0x2d; break; // * - case Key::tidle: keyAddress.id = 0x2e; break; + case Key::tilde: keyAddress.id = 0x2e; break; case Key::open_bracket: keyAddress.id = 0x2f; break; case Key::close_bracket: keyAddress.id = 0x30; break; case Key::unknown: keyAddress.id = 0x31; break; // * @@ -291,7 +291,7 @@ bool Keyboard::parseKey(std::string key, KeyAddress &keyAddress) { else if (key == "tab") parsedKey = Key::tab; else if (key == "space") parsedKey = Key::space; else if (key == "'" || key == "?") parsedKey = Key::apostrophe; - else if (key == "tidle" || key == "^" || key == "~") parsedKey = Key::tidle; + else if (key == "tilde" || key == "^" || key == "~") parsedKey = Key::tilde; else if (key == "open_bracket" || key == "openbracket" || key == "è" || key == "ü") parsedKey = Key::open_bracket; else if (key == "close_bracket" || key == "closebracket" || key == "¨" || key == "!") parsedKey = Key::close_bracket; else if (key == "unknown") parsedKey = Key::unknown; // Not on my keyboard diff --git a/src/classes/Keyboard.h b/src/classes/Keyboard.h index aa8cd8f..ca4b824 100644 --- a/src/classes/Keyboard.h +++ b/src/classes/Keyboard.h @@ -24,7 +24,7 @@ class Keyboard { tab, caps_lock, space, backspace, enter, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, unknown, egrave, eaigu, semicolon, agrave, dollar, apostrophe, degree, backslash, // Need best names - comma, dot, minus, open_bracket, close_bracket, tidle + comma, dot, minus, open_bracket, close_bracket, tilde }; enum class KeyGroup { logo, indicators, multimedia, fkeys, modifiers, arrows, numeric, functions, keys};