summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2013-04-04 09:29:44 +0200
committertmk <nobody@nowhere>2013-04-04 09:29:44 +0200
commitf9a7e224a4de28e52d268c801dc12c8de8c79b3f (patch)
tree063e0e4db5a4eaa1342a6ba8f20352a08b4e9b76 /common
parentebe798f081ce018826dc882a40fc77ec8a0ad023 (diff)
downloadqmk_firmware-f9a7e224a4de28e52d268c801dc12c8de8c79b3f.tar.gz
qmk_firmware-f9a7e224a4de28e52d268c801dc12c8de8c79b3f.tar.xz
Fix ACT_MODS action and switch_default_layer command
Diffstat (limited to 'common')
-rw-r--r--common/action.c9
-rw-r--r--common/command.c2
2 files changed, 3 insertions, 8 deletions
diff --git a/common/action.c b/common/action.c
index 158522dd0..065188744 100644
--- a/common/action.c
+++ b/common/action.c
@@ -72,22 +72,17 @@ void process_action(keyrecord_t *record)
uint8_t mods = (action.kind.id == ACT_LMODS) ? action.key.mods :
action.key.mods<<4;
if (event.pressed) {
- uint8_t tmp_mods = host_get_mods();
if (mods) {
host_add_mods(mods);
host_send_keyboard_report();
}
register_code(action.key.code);
- if (mods && action.key.code) {
- host_set_mods(tmp_mods);
- host_send_keyboard_report();
- }
} else {
- if (mods && !action.key.code) {
+ unregister_code(action.key.code);
+ if (mods) {
host_del_mods(mods);
host_send_keyboard_report();
}
- unregister_code(action.key.code);
}
}
break;
diff --git a/common/command.c b/common/command.c
index dc06c6da3..3a1fcb186 100644
--- a/common/command.c
+++ b/common/command.c
@@ -574,7 +574,7 @@ static uint8_t numkey2num(uint8_t code)
static void switch_default_layer(uint8_t layer)
{
print("switch_default_layer: "); print_dec(biton32(default_layer_state));
+ print(" to "); print_dec(layer); print("\n");
default_layer_set(layer);
- print(" to "); print_dec(biton32(default_layer_state)); print("\n");
clear_keyboard();
}