From 84ac0781b43776bf4925d2558eaa059d2882fdf0 Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Tue, 26 Jan 2016 23:42:36 -0800 Subject: [PATCH] Add support for composite keys with ctrl, alt or gui held --- KeyboardioFirmware.ino | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/KeyboardioFirmware.ino b/KeyboardioFirmware.ino index 5dad67ef..b57234a5 100644 --- a/KeyboardioFirmware.ino +++ b/KeyboardioFirmware.ino @@ -119,6 +119,15 @@ void press_key(Key mappedKey) { if (mappedKey.flags & SHIFT_HELD) { Keyboard.press(Key_LShift.rawKey); } + if (mappedKey.flags & CTRL_HELD) { + Keyboard.press(Key_LCtrl.rawKey); + } + if (mappedKey.flags & ALT_HELD) { + Keyboard.press(Key_RAlt.rawKey); + } + if (mappedKey.flags & GUI_HELD) { + Keyboard.press(Key_LGUI.rawKey); + } Keyboard.press(mappedKey.rawKey); }