From 9bed3db9be66e951f133b9dda320b9d97e8ae470 Mon Sep 17 00:00:00 2001 From: Josh Klar Date: Sat, 29 Dec 2018 15:36:46 -0800 Subject: [PATCH] Update all other keymaps currently in the system --- user_keymaps/kdb424/klanck.py | 21 ++++++++++---------- user_keymaps/kdb424/levinson_m4.py | 19 +++++++++--------- user_keymaps/kdb424/nyquist_converter.py | 23 +++++++++++----------- user_keymaps/klardotsh/kitsym4_iris.py | 25 ++++++++++++------------ 4 files changed, 43 insertions(+), 45 deletions(-) diff --git a/user_keymaps/kdb424/klanck.py b/user_keymaps/kdb424/klanck.py index c86d623..f5366d0 100644 --- a/user_keymaps/kdb424/klanck.py +++ b/user_keymaps/kdb424/klanck.py @@ -1,8 +1,7 @@ from kmk.consts import DiodeOrientation, UnicodeMode -from kmk.keycodes import KC -from kmk.keycodes import generate_leader_dictionary_seq as glds -from kmk.macros.simple import send_string -from kmk.macros.unicode import compile_unicode_string_sequences +from kmk.handlers.sequences import (compile_unicode_string_sequences, + send_string) +from kmk.keys import KC from kmk.mcus.circuitpython_samd51 import Firmware from kmk.pins import Pin as P from kmk.types import AttrDict @@ -35,13 +34,13 @@ emoticons = compile_unicode_string_sequences({ # ---------------------- Leader Key Macros -------------------------------------------- keyboard.leader_dictionary = { - glds('flip'): emoticons.ANGRY_TABLE_FLIP, - glds('cheer'): emoticons.CHEER, - glds('wat'): emoticons.WAT, - glds('ff'): emoticons.FF, - glds('f'): emoticons.F, - glds('meh'): emoticons.MEH, - glds('yay'): emoticons.YAY, + 'flip': emoticons.ANGRY_TABLE_FLIP, + 'cheer': emoticons.CHEER, + 'wat': emoticons.WAT, + 'ff': emoticons.FF, + 'f': emoticons.F, + 'meh': emoticons.MEH, + 'yay': emoticons.YAY, } 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.") diff --git a/user_keymaps/kdb424/levinson_m4.py b/user_keymaps/kdb424/levinson_m4.py index 2fb97a4..2c9d33e 100644 --- a/user_keymaps/kdb424/levinson_m4.py +++ b/user_keymaps/kdb424/levinson_m4.py @@ -2,9 +2,8 @@ import board import busio from kmk.consts import DiodeOrientation, LeaderMode, UnicodeMode -from kmk.keycodes import KC -from kmk.keycodes import generate_leader_dictionary_seq as glds -from kmk.macros.unicode import compile_unicode_string_sequences +from kmk.handlers.sequences import compile_unicode_string_sequences +from kmk.keys import KC from kmk.mcus.circuitpython_samd51 import Firmware from kmk.pins import Pin as P @@ -42,13 +41,13 @@ emoticons = compile_unicode_string_sequences({ # ---------------------- Leader Key Macros -------------------------------------------- keyboard.leader_dictionary = { - glds('flip'): emoticons.ANGRY_TABLE_FLIP, - glds('cheer'): emoticons.CHEER, - glds('wat'): emoticons.WAT, - glds('ff'): emoticons.FF, - glds('f'): emoticons.F, - glds('meh'): emoticons.MEH, - glds('yay'): emoticons.YAY, + 'flip': emoticons.ANGRY_TABLE_FLIP, + 'cheer': emoticons.CHEER, + 'wat': emoticons.WAT, + 'ff': emoticons.FF, + 'f': emoticons.F, + 'meh': emoticons.MEH, + 'yay': emoticons.YAY, } # ---------------------- Keymap --------------------------------------------------------- diff --git a/user_keymaps/kdb424/nyquist_converter.py b/user_keymaps/kdb424/nyquist_converter.py index fd604d7..d937436 100644 --- a/user_keymaps/kdb424/nyquist_converter.py +++ b/user_keymaps/kdb424/nyquist_converter.py @@ -2,10 +2,9 @@ import board import busio from kmk.consts import DiodeOrientation, LeaderMode, UnicodeMode -from kmk.keycodes import KC -from kmk.keycodes import generate_leader_dictionary_seq as glds -from kmk.macros.simple import simple_key_sequence -from kmk.macros.unicode import compile_unicode_string_sequences +from kmk.handlers.sequences import (compile_unicode_string_sequences, + simple_key_sequence) +from kmk.keys import KC from kmk.mcus.circuitpython_samd51 import Firmware from kmk.pins import Pin as P @@ -43,14 +42,14 @@ emoticons = compile_unicode_string_sequences({ # ---------------------- Leader Key Macros -------------------------------------------- keyboard.leader_dictionary = { - glds('flip'): emoticons.ANGRY_TABLE_FLIP, - glds('cheer'): emoticons.CHEER, - glds('wat'): emoticons.WAT, - glds('ff'): emoticons.FF, - glds('f'): emoticons.F, - glds('meh'): emoticons.MEH, - glds('yay'): emoticons.YAY, - glds('gw'): simple_key_sequence([KC.DF(1)]), + 'flip': emoticons.ANGRY_TABLE_FLIP, + 'cheer': emoticons.CHEER, + 'wat': emoticons.WAT, + 'ff': emoticons.FF, + 'f': emoticons.F, + 'meh': emoticons.MEH, + 'yay': emoticons.YAY, + 'gw': simple_key_sequence([KC.DF(1)]), } _______ = KC.TRNS diff --git a/user_keymaps/klardotsh/kitsym4_iris.py b/user_keymaps/klardotsh/kitsym4_iris.py index 72f91ff..5531b12 100644 --- a/user_keymaps/klardotsh/kitsym4_iris.py +++ b/user_keymaps/klardotsh/kitsym4_iris.py @@ -1,9 +1,8 @@ from kmk.boards.kitsym4_iris import Firmware from kmk.consts import LeaderMode, UnicodeMode -from kmk.keycodes import KC -from kmk.keycodes import generate_leader_dictionary_seq as glds -from kmk.macros.simple import send_string -from kmk.macros.unicode import compile_unicode_string_sequences as cuss +from kmk.handlers.sequences import compile_unicode_string_sequences as cuss +from kmk.handlers.sequences import send_string +from kmk.keys import KC keyboard = Firmware() @@ -43,15 +42,17 @@ 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.TIMEOUT +keyboard.leader_mode = LeaderMode.ENTER keyboard.leader_dictionary = { - glds('hello'): send_string('hello world from kmk macros'), - glds('wpm'): WPM, - glds('atf'): emoticons.ANGRY_TABLE_FLIP, - glds('tf'): emoticons.TABLE_FLIP, - glds('fca'): emoticons.FLAG_CA, - glds('fus'): emoticons.FLAG_US, - glds('cel'): emoticons.CELEBRATORY_GLITTER, + '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, } _______ = KC.TRNS