core: Fix LAYER_MODS() and LAYER_TAP()

- LAYER_MODS() accepts either left or right modifiers
- LAYER_TAP() can use modifier as tap key, related to #422
This commit is contained in:
tmk 2017-01-11 10:30:47 +09:00
parent be80ed2ef3
commit c0f0909051
4 changed files with 36 additions and 18 deletions

View file

@ -569,7 +569,7 @@ This registers modifier key(s) simultaneously with layer switching.
ACTION_LAYER_MODS(2, MOD_LSFT | MOD_LALT)
This function can only register left-sided modifiers. The handedness of the modifier (left/right) is an extra bit that is not able to be passed through into the layer system. See: [`common/action_code.h`](../common/action_code.h), the spec for ACT_LAYER_TAP only allows four bits for the mods, whereas the mods themselves require five bits, with the high bit being the left/right handedness.
You can combine four modifiers at most but cannot use both left and right modifiers at a time, either left or right modiiers only can be allowed.
## 4. Tapping