Created
September 7, 2022 00:46
-
-
Save LukeDRussell/d547d40f8bcd78fe5c4572365103581b to your computer and use it in GitHub Desktop.
KMK config for FFKB
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import kb | |
from kmk.keys import KC | |
from kmk.modules.combos import Combos, Sequence | |
from kmk.modules.dynamic_sequences import DynamicSequences | |
from kmk.modules.layers import Layers | |
from kmk.modules.oneshot import OneShot | |
combos = Combos() | |
dyn_seq = DynamicSequences( | |
slots=1, | |
timeout=60000, | |
key_interval=20, | |
use_recorded_speed=False, | |
) | |
layers = Layers() | |
oneshot = OneShot() | |
keyboard = kb.KMKKeyboard() | |
keyboard.modules = [combos, dyn_seq, layers, oneshot] | |
keyboard.debug_enabled = False | |
# Convenience variables for the Keymap | |
_______ = KC.TRNS | |
xxxxxxx = KC.NO | |
L1_TAB = KC.LT(1, KC.TAB, prefer_hold=True) | |
L2_ENT = KC.LT(2, KC.ENT, prefer_hold=True) | |
OS_LSFT = KC.OS(KC.LSFT) | |
SEQ_REC = KC.RECORD_SEQUENCE() | |
SEQ_STP = KC.STOP_SEQUENCE() | |
SEQ_PLY = KC.PLAY_SEQUENCE() | |
combos.combos = [ | |
Sequence((KC.LEADER, KC.A), KC.LCTL(KC.A)), # select All | |
Sequence((KC.LEADER, KC.T), KC.LCTL(KC.X)), # cuT | |
Sequence((KC.LEADER, KC.C), KC.LCTL(KC.C)), # Copy | |
Sequence((KC.LEADER, KC.P), KC.LCTL(KC.V)), # Paste | |
Sequence((KC.LEADER, KC.U), KC.LCTL(KC.Z)), # Undo | |
Sequence((KC.LEADER, KC.Y), KC.LCTL(KC.Y)), # redo | |
] | |
SNAPRIGHT = KC.LGUI(KC.RIGHT) | |
# flake8: noqa | |
keyboard.keymap = [ | |
[ # 0: Colemak-DH letters | |
KC.ESC, KC.Q, KC.W, KC.F, KC.P, KC.B, KC.J, KC.L, KC.U, KC.Y, KC.SCLN, SNAPRIGHT, | |
KC.LCTL, KC.A, KC.R, KC.S, KC.T, KC.G, KC.M, KC.N, KC.E, KC.I, KC.O, KC.QUOT, | |
KC.LALT, KC.Z, KC.X, KC.C, KC.D, KC.V, KC.K, KC.H, KC.COMM, KC.DOT, KC.SLSH, KC.BSLS, | |
xxxxxxx, KC.LGUI, OS_LSFT, KC.BSPC, L1_TAB, KC.SPACE,L2_ENT, xxxxxxx, | |
], | |
[ # 1: Nav & Numbers | |
KC.TAB, KC.N1, KC.N2, KC.N3, KC.N4, KC.N5, KC.N6, KC.N7, KC.N8, KC.N9, KC.N0, KC.DEL, | |
_______, KC.LPRN, KC.LEFT, KC.UP, KC.RIGHT,KC.RPRN, KC.GRV, KC.PLUS, KC.EQL, xxxxxxx, xxxxxxx, xxxxxxx, | |
_______, KC.LBRC, KC.LCBR, KC.DOWN, KC.RCBR, KC.RBRC, KC.TILD, KC.MINS, KC.UNDS, xxxxxxx, xxxxxxx, xxxxxxx, | |
_______, _______, _______, KC.DEL, _______, _______, _______, _______, | |
], | |
[ # 2: F-row & Board Functions | |
KC.F12, KC.F1, KC.F2, KC.F3, KC.F4, KC.F5, KC.F6, KC.F7, KC.F8, KC.F9, KC.F10, KC.F11, | |
_______, SEQ_REC, SEQ_PLY, _______, _______, _______, _______, _______, _______, _______, _______, | |
_______, SEQ_STP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |
_______, _______, _______, _______, _______, _______, _______, _______, | |
], | |
] | |
if __name__ == '__main__': | |
print() | |
print("KMK starting...") | |
print() | |
keyboard.go() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment