1
0

Fix SET_DEFAULT_LAYER action and keymap of gh60

This commit is contained in:
tmk 2013-02-27 10:32:46 +09:00
parent 71bd9a72fb
commit d193a6d2ef
2 changed files with 1 additions and 7 deletions

View File

@ -470,7 +470,7 @@ See `keyboard/hhkb/keymap.c` for sample.
### 3. Layer
Layer is key-action map to assign action to every physical key. You can define multiple layers in keymap and make layers active out of keymap during operation at will.
First layer is indexed by `0` which usually become **`default layer`** and active in initial state.
First layer is indexed by `0` which usually become `default layer` and active in initial state.
You can define **16 layers** at most in each keymaps[] and overlays[].

View File

@ -384,21 +384,15 @@ static void process_action(keyrecord_t *record)
/* Keymap Reset default layer */
case (OP_RESET | ON_PRESS):
if (event.pressed) {
overlay_clear();
keymap_clear();
default_layer_set(action.layer.val);
}
break;
case (OP_RESET | ON_RELEASE):
if (!event.pressed) {
overlay_clear();
keymap_clear();
default_layer_set(action.layer.val);
}
break;
case (OP_RESET | ON_BOTH):
overlay_clear();
keymap_clear();
default_layer_set(action.layer.val);
break;