2ccad46e26
* update modtap to holdtap
* Update links
* Revert "Update links"
This reverts commit 8d0cda7c5a
.
* updated docs links
update links in docs
* Update docs/en/Getting_Started.md
Co-authored-by: xs5871 <60395129+xs5871@users.noreply.github.com>
* Update docs/en/Getting_Started.md
Co-authored-by: xs5871 <60395129+xs5871@users.noreply.github.com>
* rename modtap.md to holdtap.md
* Update Getting_Started.md
* Update main.py
* Update modtap.py
* Update modtap.py and add notice
* Update docs/en/porting_to_kmk.md
Co-authored-by: xs5871 <60395129+xs5871@users.noreply.github.com>
* Update docs/en/handwiring.md
Co-authored-by: xs5871 <60395129+xs5871@users.noreply.github.com>
* Update docs/en/contributing.md
Co-authored-by: xs5871 <60395129+xs5871@users.noreply.github.com>
* Update docs/en/contributing.md
Co-authored-by: xs5871 <60395129+xs5871@users.noreply.github.com>
* Update docs/en/ble_hid.md
Co-authored-by: xs5871 <60395129+xs5871@users.noreply.github.com>
* Update docs/en/Getting_Started.md
Co-authored-by: xs5871 <60395129+xs5871@users.noreply.github.com>
* Update docs/en/Getting_Started.md
Co-authored-by: xs5871 <60395129+xs5871@users.noreply.github.com>
* Update docs/en/kmkpython_vs_circuitpython.md
Co-authored-by: xs5871 <60395129+xs5871@users.noreply.github.com>
* Rename modtap.md to holdtap.md
* fixup
---------
Co-authored-by: xs5871 <60395129+xs5871@users.noreply.github.com>
66 lines
2.9 KiB
Python
66 lines
2.9 KiB
Python
from kb import KMKKeyboard
|
|
|
|
from kmk.extensions.rgb import RGB
|
|
from kmk.keys import KC
|
|
from kmk.modules.holdtap import HoldTap
|
|
from kmk.modules.layers import Layers
|
|
|
|
keyboard = KMKKeyboard()
|
|
|
|
# Adding extensions
|
|
rgb = RGB(pixel_pin=keyboard.rgb_pixel_pin, num_pixels=keyboard.rgb_num_pixels, val_limit=100, hue_default=190, sat_default=100, val_default=5)
|
|
|
|
holdtap = HoldTap()
|
|
layers_ext = Layers()
|
|
|
|
keyboard.modules = [layers_ext, holdtap]
|
|
keyboard.extensions = [rgb]
|
|
|
|
# Cleaner key names
|
|
_______ = KC.TRNS
|
|
XXXXXXX = KC.NO
|
|
|
|
LOWER = KC.MO(1)
|
|
RAISE = KC.MO(2)
|
|
ADJUST = KC.LT(3, KC.SPC)
|
|
RSFT_ENT = KC.HT(KC.ENT, KC.RSFT)
|
|
RSFT_SPC = KC.HT(KC.SPC, KC.RSFT)
|
|
|
|
RGB_TOG = KC.RGB_TOG
|
|
RGB_HUI = KC.RGB_HUI
|
|
RGB_HUD = KC.RGB_HUI
|
|
RGB_SAI = KC.RGB_SAI
|
|
RGB_SAD = KC.RGB_SAD
|
|
RGB_VAI = KC.RGB_VAI
|
|
RGB_VAD = KC.RGB_VAD
|
|
|
|
keyboard.keymap = [
|
|
[ #QWERTY
|
|
KC.TAB, KC.Q, KC.W, KC.E, KC.R, KC.T, KC.Y, KC.U, KC.I, KC.O, KC.P, KC.BSPC,
|
|
KC.LCTL, KC.A, KC.S, KC.D, KC.F, KC.G, KC.H, KC.J, KC.K, KC.L, KC.SCLN, KC.QUOT,
|
|
KC.LSFT, KC.Z, KC.X, KC.C, KC.V, KC.B, KC.N, KC.M, KC.COMM, KC.DOT, KC.SLSH, RSFT_ENT,
|
|
KC.LALT, LOWER, KC.SPC, RAISE, KC.RGUI,
|
|
],
|
|
[ #LOWER
|
|
KC.ESC, KC.N1, KC.N2, KC.N3, KC.N4, KC.N5, KC.N6, KC.N7, KC.N8, KC.N9, KC.N0, KC.BSPC,
|
|
KC.LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC.LEFT, KC.DOWN, KC.UP, KC.RIGHT, XXXXXXX, XXXXXXX,
|
|
KC.LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RSFT_SPC,
|
|
KC.LALT, LOWER, KC.SPC, RAISE, KC.RGUI,
|
|
],
|
|
[ #RAISE
|
|
KC.ESC, KC.EXLM, KC.AT, KC.HASH, KC.DLR, KC.PERC, KC.CIRC, KC.AMPR, KC.ASTR, KC.LPRN, KC.RPRN, KC.BSPC,
|
|
KC.LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC.MINS, KC.EQL, KC.LCBR, KC.RCBR, KC.PIPE, KC.GRV,
|
|
KC.LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC.UNDS, KC.PLUS, KC.LBRC, KC.RBRC, KC.BSLS, KC.TILD,
|
|
KC.LALT, LOWER, KC.SPC, RAISE, KC.RGUI,
|
|
],
|
|
[ #ADJUST
|
|
RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
|
XXXXXXX, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
|
KC.LALT, LOWER, KC.SPC, RAISE, KC.RGUI,
|
|
]
|
|
]
|
|
|
|
if __name__ == '__main__':
|
|
keyboard.go()
|