Missed some obvious things
This commit is contained in:
parent
e792524b63
commit
a2cfa92f2f
@ -229,23 +229,3 @@
|
||||
|`KC.RALT(kc)`|Hold Right Alt and press `kc` |
|
||||
|`KC.RGUI(kc)`|Hold Right GUI and press `kc` |
|
||||
|
||||
|
||||
## [Mod-Tap Keys] NOT IMPLEMENTED AT THIS TIME
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|------------|---------------------------------------|-------------------------------------------------------|
|
||||
|`LCTL_T(kc)`|`CTL_T(kc)` |Left Control when held, `kc` when tapped |
|
||||
|`RCTL_T(kc)`| |Right Control when held, `kc` when tapped |
|
||||
|`LSFT_T(kc)`|`SFT_T(kc)` |Left Shift when held, `kc` when tapped |
|
||||
|`RSFT_T(kc)`| |Right Shift when held, `kc` when tapped |
|
||||
|`LALT_T(kc)`|`ALT_T(kc)` |Left Alt when held, `kc` when tapped |
|
||||
|`RALT_T(kc)`|`ALGR_T(kc)` |Right Alt when held, `kc` when tapped |
|
||||
|`LGUI_T(kc)`|`LCMD_T(kc)`, `RWIN_T(kc)`, `GUI_T(kc)`|Left GUI when held, `kc` when tapped |
|
||||
|`RGUI_T(kc)`|`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped |
|
||||
|`C_S_T(kc)` | |Left Control and Shift when held, `kc` when tapped |
|
||||
|`MEH_T(kc)` | |Left Control, Shift and Alt when held, `kc` when tapped|
|
||||
|`LCAG_T(kc)`| |Left Control, Alt and GUI when held, `kc` when tapped |
|
||||
|`RCAG_T(kc)`| |Right Control, Alt and GUI when held, `kc` when tapped |
|
||||
|`ALL_T(kc)` | |Left Control, Shift, Alt and GUI when held, `kc` when tapped - more info [here](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)|
|
||||
|`SGUI_T(kc)`|`SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped |
|
||||
|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped |
|
||||
|
@ -6,19 +6,25 @@ One key if you tap it, one or more modifiers if you hold it!
|
||||
Just copy the example from New Keycode above your keymap and change KC.SOMETHING to the key that you want when tapped.
|
||||
After that, just use the new keycode anywhere in your keymap.
|
||||
|
||||
|New Keycode | Description |
|
||||
|------------------------------------------------------------------|-----------------------------------------------------------------|
|
||||
|LCTL = KC.MT(KC.LCTRL, kc=KC.SOMETHING) |`LCTRL` if held `kc` if tapped |
|
||||
|LSFT = KC.MT(KC.LSFT, kc=KC.SOMETHING) |`LSHIFT` if held `kc` if tapped |
|
||||
|LALT = KC.MT(KC.LALT, kc=KC.SOMETHING) |`LALT` if held `kc` if tapped |
|
||||
|LGUI = KC.MT(KC.LGUI, kc=KC.SOMETHING) |`LGUI` if held `kc` if tapped |
|
||||
|RCTL = KC.MT(KC.RCTRL, kc=KC.SOMETHING) |`RCTRL` if held `kc` if tapped |
|
||||
|RSFT = KC.MT(KC.RSFT, kc=KC.SOMETHING) |`RSHIFT` if held `kc` if tapped |
|
||||
|RALT = KC.MT(KC.RALT, kc=KC.SOMETHING) |`RALT` if held `kc` if tapped |
|
||||
|RGUI = KC.MT(KC.RGUI, kc=KC.SOMETHING) |`RGUI` if held `kc` if tapped |
|
||||
|SGUI = KC.MT(KC.LSHFT, KC.LGUI, kc=KC.SOMETHING) |`LSHIFT` and `LGUI` if held `kc` if tapped |
|
||||
|LCA = KC.MT(KC.LCTRL, KC.LALT, kc=KC.SOMETHING) |`LCTRL` and `LALT` if held `kc` if tapped |
|
||||
|LCAG = KC.MT(KC.LCTRL, KC.LALT, KC.LGUI, kc=KC.SOMETHING) |`LCTRL` and `LALT` and `LGUI` if held `kc` if tapped |
|
||||
|MEH = KC.MT(KC.LCTRL, KC.LSFT, KC.LALT, kc=KC.SOMETHING) |`CTRL` and `LSHIFT` and `LALT` if held `kc` if tapped |
|
||||
|HYPR = KC.MT(KC.LCTRL, KC.LSFT, KC.LALT, KC.LGUI, kc=KC.SOMETHING)|`LCTRL` and `LSHIFT` and `LALT` and `LGUI` if held `kc` if tapped|
|
||||
|New Keycode | Description |
|
||||
|---------------------------------------------------------------|-----------------------------------------------------------------|
|
||||
|LCTL = KC.MT(KC.SOMETHING, KC.LCTRL) |`LCTRL` if held `kc` if tapped |
|
||||
|LSFT = KC.MT(KC.SOMETHING, KC.LSFT) |`LSHIFT` if held `kc` if tapped |
|
||||
|LALT = KC.MT(KC.SOMETHING, KC.LALT) |`LALT` if held `kc` if tapped |
|
||||
|LGUI = KC.MT(KC.SOMETHING, KC.LGUI) |`LGUI` if held `kc` if tapped |
|
||||
|RCTL = KC.MT(KC.SOMETHING, KC.RCTRL) |`RCTRL` if held `kc` if tapped |
|
||||
|RSFT = KC.MT(KC.SOMETHING, KC.RSFT) |`RSHIFT` if held `kc` if tapped |
|
||||
|RALT = KC.MT(KC.SOMETHING, KC.RALT) |`RALT` if held `kc` if tapped |
|
||||
|RGUI = KC.MT(KC.SOMETHING, KC.RGUI) |`RGUI` if held `kc` if tapped |
|
||||
|SGUI = KC.MT(KC.SOMETHING, KC.LSHFT, KC.LGUI) |`LSHIFT` and `LGUI` if held `kc` if tapped |
|
||||
|LCA = KC.MT(KC.SOMETHING, KC.LCTRL, KC.LALT) |`LCTRL` and `LALT` if held `kc` if tapped |
|
||||
|LCAG = KC.MT(KC.SOMETHING, KC.LCTRL, KC.LALT, KC.LGUI) |`LCTRL` and `LALT` and `LGUI` if held `kc` if tapped |
|
||||
|MEH = KC.MT(KC.SOMETHING, KC.LCTRL, KC.LSFT, KC.LALT) |`CTRL` and `LSHIFT` and `LALT` if held `kc` if tapped |
|
||||
|HYPR = KC.MT(KC.SOMETHING, KC.LCTRL, KC.LSFT, KC.LALT, KC.LGUI)|`LCTRL` and `LSHIFT` and `LALT` and `LGUI` if held `kc` if tapped|
|
||||
|
||||
```python
|
||||
SHFT_HOME = KC.MT(KC.HOME, KC.LSFT)
|
||||
|
||||
keyboard.keymap = [[ ...., SHFT_HOME, ....], ....]
|
||||
```
|
||||
|
||||
|
@ -679,11 +679,11 @@ make_argumented_key(
|
||||
)
|
||||
|
||||
|
||||
def mod_tap_validator(mod1, mod2=None, mod3=None, mod4=None, kc=None):
|
||||
def mod_tap_validator(kc, mod1=None, mod2=None, mod3=None, mod4=None):
|
||||
'''
|
||||
Validates that mod tap keys are correctly used
|
||||
'''
|
||||
return ModTapKeyMeta(mod1=mod1, mod2=mod2, mod3=mod3, mod4=mod4, kc=kc)
|
||||
return ModTapKeyMeta(kc=kc, mod1=mod1, mod2=mod2, mod3=mod3, mod4=mod4)
|
||||
|
||||
|
||||
# ModTap
|
||||
|
@ -33,7 +33,7 @@ class LayerKeyMeta:
|
||||
|
||||
|
||||
class ModTapKeyMeta:
|
||||
def __init__(self, mod1=None, mod2=None, mod3=None, mod4=None, kc=None):
|
||||
def __init__(self, kc=None, mod1=None, mod2=None, mod3=None, mod4=None):
|
||||
self.mod1 = mod1
|
||||
self.mod2 = mod2
|
||||
self.mod3 = mod3
|
||||
|
Loading…
Reference in New Issue
Block a user