From 658975aab461297cf1e1189bd4373c4c2aefba57 Mon Sep 17 00:00:00 2001 From: MatMoul Date: Tue, 9 Aug 2016 17:14:20 +0200 Subject: [PATCH] Add semicolon for US Keyboard --- src/classes/Keyboard.cpp | 3 ++- src/classes/Keyboard.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/classes/Keyboard.cpp b/src/classes/Keyboard.cpp index bbf078f..d6d87c1 100644 --- a/src/classes/Keyboard.cpp +++ b/src/classes/Keyboard.cpp @@ -161,6 +161,7 @@ bool Keyboard::getKeyAddress(Key key, KeyAddress &keyAddress) { case Key::unknown: keyAddress.id = 0x31; break; // * case Key::dollar: keyAddress.id = 0x32; break; // * case Key::eaigu: keyAddress.id = 0x33; break; // * + case Key::semicolon: keyAddress.id = 0x33; break; // * case Key::agrave: keyAddress.id = 0x34; break; // * case Key::degree: keyAddress.id = 0x35; break; // * case Key::comma: keyAddress.id = 0x36; break; @@ -294,7 +295,7 @@ bool Keyboard::parseKey(std::string key, KeyAddress &keyAddress) { else if (key == "close_bracket" || key == "closebracket" || key == "¨" || key == "!") parsedKey = Key::close_bracket; else if (key == "unknown") parsedKey = Key::unknown; // Not on my keyboard else if (key == "$" || key == "dollar") parsedKey = Key::dollar; - else if (key == "é" || key == "ö") parsedKey = Key::eaigu; + else if (key == ";" || key == "semicolon" || key == "é" || key == "ö") parsedKey = Key::semicolon; else if (key == "à" || key == "ä") parsedKey = Key::agrave; else if (key == "§" || key == "°") parsedKey = Key::degree; else if (key == "," || key == "comma") parsedKey = Key::comma; diff --git a/src/classes/Keyboard.h b/src/classes/Keyboard.h index 45cdefe..45ffb64 100644 --- a/src/classes/Keyboard.h +++ b/src/classes/Keyboard.h @@ -23,7 +23,7 @@ class Keyboard { n1, n2, n3, n4, n5, n6, n7, n8, n9, n0, 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, agrave, dollar, apostrophe, degree, backslash, // Need best names + unknown, egrave, eaigu, semicolon, agrave, dollar, apostrophe, degree, backslash, // Need best names comma, dot, minus, open_bracket, close_bracket, tidle }; enum class KeyGroup { logo, indicators, multimedia, fkeys, modifiers, arrows, numeric, functions, keys};