feat(extensions): most of the extensions implementation, by kdb424

This commit is contained in:
Kyle Brown
2020-10-21 12:19:42 -07:00
committed by Josh Klar
parent 9821f7bcc3
commit e72d2b8c34
140 changed files with 3860 additions and 2312 deletions

View File

@@ -1,10 +1,15 @@
from kmk.boards.converter.keebio.iris_r2 import KMKKeyboard
from kmk.consts import LeaderMode, UnicodeMode
from kb import KMKKeyboard
from kmk.consts import UnicodeMode
from kmk.handlers.sequences import compile_unicode_string_sequences as cuss
from kmk.handlers.sequences import send_string
from kmk.keys import KC
from kmk.modules.layers import Layers
from kmk.modules.split import Split, SplitType
keyboard = KMKKeyboard()
layers_ext = Layers()
split = Split(split_type=SplitType.UART)
keyboard.modules = [layers_ext, split]
keyboard.debug_enabled = False
keyboard.unicode_mode = UnicodeMode.LINUX
@@ -43,24 +48,6 @@ emoticons = cuss({
WPM = send_string('Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Bibendum arcu vitae elementum curabitur vitae nunc sed. Facilisis sed odio morbi quis.')
keyboard.leader_mode = LeaderMode.ENTER
keyboard.leader_dictionary = {
'hello': send_string('hello world from kmk macros'),
'wpm': WPM,
'atf': emoticons.ANGRY_TABLE_FLIP,
'tf': emoticons.TABLE_FLIP,
'fca': emoticons.FLAG_CA,
'fus': emoticons.FLAG_US,
'cel': emoticons.CELEBRATORY_GLITTER,
'shr': emoticons.SHRUGGIE,
'shre': emoticons.SHRUG_EMOJI,
'poop': emoticons.POOP,
'joy': emoticons.FACE_JOY,
'ls': KC.LGUI(KC.HOME), # Lock screen
'cw': KC.LGUI(KC.END), # Close window
'dbg': KC.DBG,
}
_______ = KC.TRNS
xxxxxxx = KC.NO
HELLA_TD = KC.TD(
@@ -70,6 +57,7 @@ HELLA_TD = KC.TD(
KC.TG(1),
)
keyboard.keymap = [
[
KC.GESC, KC.N1, KC.N2, KC.N3, KC.N4, KC.N5, KC.N6, KC.N7, KC.N8, KC.N9, KC.N0, KC.BSPC,
@@ -82,7 +70,7 @@ keyboard.keymap = [
_______, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, KC.F10, KC.F11, KC.F12, xxxxxxx, xxxxxxx, _______,
xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, KC.F7, KC.F8, KC.F9, xxxxxxx, xxxxxxx, KC.EQUAL,
xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, KC.INS, KC.F4, KC.F5, KC.F6, xxxxxxx, xxxxxxx, xxxxxxx,
xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, KC.LEAD, _______, KC.F1, KC.F2, KC.F3, xxxxxxx, xxxxxxx, _______,
xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, KC.NO, _______, KC.F1, KC.F2, KC.F3, xxxxxxx, xxxxxxx, _______,
KC.HOME, KC.END, _______, xxxxxxx, KC.PGUP, KC.PGDN,
],
[

View File

@@ -1,13 +1,15 @@
from kmk.boards.klarank import KMKKeyboard
from kb import KMKKeyboard
from kmk.consts import UnicodeMode
from kmk.extensions.leader import Leader, LeaderMode
from kmk.handlers.sequences import compile_unicode_string_sequences as cuss
from kmk.handlers.sequences import send_string
from kmk.keys import KC, make_key
from kmk.modules.layers import Layers
keyboard = KMKKeyboard()
layers_ext = Layers()
keyboard.modules = [layers_ext]
keyboard.debug_enabled = True
keyboard.debug_enabled = False
keyboard.unicode_mode = UnicodeMode.LINUX
keyboard.tap_time = 750
@@ -52,22 +54,6 @@ HELLA_TD = KC.TD(
KC.TG(1),
)
leader_ext = Leader(mode=LeaderMode.ENTER, sequences={
'hello': send_string('hello world from kmk macros'),
'wpm': WPM,
'atf': emoticons.ANGRY_TABLE_FLIP,
'tf': emoticons.TABLE_FLIP,
'fca': emoticons.FLAG_CA,
'fus': emoticons.FLAG_US,
'cel': emoticons.CELEBRATORY_GLITTER,
'shr': emoticons.SHRUGGIE,
'poop': emoticons.POOP,
'ls': KC.LGUI(KC.HOME),
'dbg': KC.DBG,
})
keyboard.extensions = [leader_ext]
def shrek_is_life(*args, **kwargs):
'''
@@ -107,7 +93,7 @@ keyboard.keymap = [
KC.GESC, KC.QUOT, KC.COMM, KC.DOT, KC.P, KC.Y, KC.F, KC.G, KC.C, KC.R, KC.L, KC.BSPC,
KC.TAB, KC.A, KC.O, KC.E, KC.U, KC.I, KC.D, KC.H, KC.T, KC.N, KC.S, KC.ENT,
KC.LGUI, KC.SCLN, KC.Q, KC.J, KC.K, KC.X, KC.B, KC.M, KC.W, KC.V, KC.Z, KC.LALT,
KC.LCTL, KC.LEAD, KC.LSHIFT(KC.LGUI), KC.MO(2), KC.MO(3), KC.LSFT, KC.SPC, KC.MO(1), KC.LEFT, KC.DOWN, KC.UP, KC.RGHT,
KC.LCTL, KC.NO, KC.LSHIFT(KC.LGUI), KC.MO(2), KC.MO(3), KC.LSFT, KC.SPC, KC.MO(1), KC.LEFT, KC.DOWN, KC.UP, KC.RGHT,
],
[