From 532782fb14e0c9ab507acd54fed78600aa9c0f4d Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Wed, 27 Jan 2016 00:10:35 -0800 Subject: [PATCH] Tiny logic cleanup --- KeyboardioFirmware.ino | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/KeyboardioFirmware.ino b/KeyboardioFirmware.ino index b4844b1d..95e8b754 100644 --- a/KeyboardioFirmware.ino +++ b/KeyboardioFirmware.ino @@ -132,9 +132,7 @@ void press_key(Key mappedKey) { void handle_keymap_key_event(byte switchState, Key keymapEntry) { - // this logic sucks. there is a better way TODO this - - if (! (keymapEntry.flags ^ MOMENTARY ))) { + if (keymapEntry.flags & MOMENTARY ) { if (key_toggled_on(switchState)) { if ( keymapEntry.rawKey == KEYMAP_NEXT) { temporary_keymap++;