We're already checking switch_to_keymap in caller

pull/18/head
Jesse Vincent 9 years ago
parent 921e700d9f
commit a88bb5f32c

@ -133,7 +133,8 @@ void press_key(Key mappedKey) {
void handle_keymap_key_event(byte switchState, Key keymapEntry) { void handle_keymap_key_event(byte switchState, Key keymapEntry) {
// this logic sucks. there is a better way TODO this // this logic sucks. there is a better way TODO this
if (! (keymapEntry.flags ^ ( MOMENTARY | SWITCH_TO_KEYMAP))) {
if (! (keymapEntry.flags ^ MOMENTARY ))) {
if (key_toggled_on(switchState)) { if (key_toggled_on(switchState)) {
if ( keymapEntry.rawKey == KEYMAP_NEXT) { if ( keymapEntry.rawKey == KEYMAP_NEXT) {
temporary_keymap++; temporary_keymap++;
@ -147,7 +148,7 @@ void handle_keymap_key_event(byte switchState, Key keymapEntry) {
temporary_keymap = primary_keymap; temporary_keymap = primary_keymap;
} }
} else if (! (keymapEntry.flags ^ ( SWITCH_TO_KEYMAP ))) { } else {
// switch keymap and stay there // switch keymap and stay there
if (key_toggled_on(switchState)) { if (key_toggled_on(switchState)) {
temporary_keymap = primary_keymap = keymapEntry.rawKey; temporary_keymap = primary_keymap = keymapEntry.rawKey;

Loading…
Cancel
Save