summaryrefslogtreecommitdiffstats
path: root/common/command.c
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2013-02-15 12:17:03 +0900
committertmk <nobody@nowhere>2013-02-15 12:31:46 +0900
commita4aae1c5055d24c400f78fd44618aef5916adc0c (patch)
treeaed7a0f5dd01527f47d0927ca229d425d78eee21 /common/command.c
parenta43ab35b7b807db03e3e8150273218d147d1737e (diff)
Change: 0 means default_layer in current_layer now
- current_layer indicates active layer at the time - default_layer indicates base layer - default_layer is used when current_layer is 0 - with this LAYER_BIT action works as overlay even if default_layer varies other than layer 0.
Diffstat (limited to 'common/command.c')
-rw-r--r--common/command.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/common/command.c b/common/command.c
index 7bb2a23f19..4c874b1092 100644
--- a/common/command.c
+++ b/common/command.c
@@ -261,8 +261,9 @@ static bool command_common(uint8_t code)
#endif
break;
#endif
+ case KC_ESC:
+ case KC_GRV:
case KC_0:
- case KC_F10:
clear_keyboard();
switch_layer(0);
break;
@@ -270,7 +271,7 @@ static bool command_common(uint8_t code)
clear_keyboard();
switch_layer((code - KC_1) + 1);
break;
- case KC_F1 ... KC_F9:
+ case KC_F1 ... KC_F12:
clear_keyboard();
switch_layer((code - KC_F1) + 1);
break;
@@ -545,7 +546,7 @@ static void switch_layer(uint8_t layer)
{
print_val_hex8(current_layer);
print_val_hex8(default_layer);
- current_layer = layer;
default_layer = layer;
+ current_layer = 0;
print("switch to "); print_val_hex8(layer);
}