Merge branch 'master' into topic-low-hanging-fruit
This commit is contained in:
commit
b296148631
@ -150,7 +150,7 @@ class UnicodeModes:
|
|||||||
|
|
||||||
|
|
||||||
class LeaderMode:
|
class LeaderMode:
|
||||||
Default = 0
|
DEFAULT = 0
|
||||||
Default_Active = 1
|
DEFAULT_ACTIVE = 1
|
||||||
Enter = 2
|
ENTER = 2
|
||||||
Enter_Active = 3
|
ENTER_ACTIVE = 3
|
||||||
|
@ -12,9 +12,9 @@ def main():
|
|||||||
keymap = getattr(kmk_keyboard_user, 'keymap')
|
keymap = getattr(kmk_keyboard_user, 'keymap')
|
||||||
rows = getattr(kmk_keyboard_user, 'rows')
|
rows = getattr(kmk_keyboard_user, 'rows')
|
||||||
|
|
||||||
DEBUG_ENABLE = getattr(kmk_keyboard_user, 'DEBUG_ENABLE', False)
|
debug_enable = getattr(kmk_keyboard_user, 'debug_enable', False)
|
||||||
|
|
||||||
if DEBUG_ENABLE:
|
if debug_enable:
|
||||||
from logging import DEBUG as log_level
|
from logging import DEBUG as log_level
|
||||||
else:
|
else:
|
||||||
from logging import ERROR as log_level
|
from logging import ERROR as log_level
|
||||||
|
@ -14,9 +14,9 @@ def main():
|
|||||||
keymap = getattr(kmk_keyboard_user, 'keymap')
|
keymap = getattr(kmk_keyboard_user, 'keymap')
|
||||||
rows = getattr(kmk_keyboard_user, 'rows')
|
rows = getattr(kmk_keyboard_user, 'rows')
|
||||||
|
|
||||||
DEBUG_ENABLE = getattr(kmk_keyboard_user, 'DEBUG_ENABLE', False)
|
debug_enable = getattr(kmk_keyboard_user, 'debug_enable', False)
|
||||||
|
|
||||||
if DEBUG_ENABLE:
|
if debug_enable:
|
||||||
from logging import DEBUG as log_level
|
from logging import DEBUG as log_level
|
||||||
else:
|
else:
|
||||||
from logging import ERROR as log_level
|
from logging import ERROR as log_level
|
||||||
|
@ -93,8 +93,8 @@ class InternalState:
|
|||||||
import kmk_keyboard_user
|
import kmk_keyboard_user
|
||||||
self.unicode_mode = getattr(kmk_keyboard_user, 'unicode_mode', UnicodeModes.NOOP)
|
self.unicode_mode = getattr(kmk_keyboard_user, 'unicode_mode', UnicodeModes.NOOP)
|
||||||
self.tap_time = getattr(kmk_keyboard_user, 'tap_time', 300)
|
self.tap_time = getattr(kmk_keyboard_user, 'tap_time', 300)
|
||||||
self.leader_mode = getattr(kmk_keyboard_user, 'leader_mode', LeaderMode.Enter)
|
self.leader_mode = getattr(kmk_keyboard_user, 'leader_mode', LeaderMode.ENTER)
|
||||||
self.LEADER_DICTIONARY = getattr(kmk_keyboard_user, 'LEADER_DICTIONARY', {})
|
self.leader_dictionary = getattr(kmk_keyboard_user, 'leader_dictionary', {})
|
||||||
self.preserve_intermediate_states = preserve_intermediate_states
|
self.preserve_intermediate_states = preserve_intermediate_states
|
||||||
|
|
||||||
def __enter__(self):
|
def __enter__(self):
|
||||||
|
@ -78,8 +78,8 @@ def process(state):
|
|||||||
"""
|
"""
|
||||||
lmh = tuple(state.leader_mode_history)
|
lmh = tuple(state.leader_mode_history)
|
||||||
|
|
||||||
if lmh in state.LEADER_DICTIONARY:
|
if lmh in state.leader_dictionary:
|
||||||
state.macro_pending = state.LEADER_DICTIONARY[lmh].keydown
|
state.macro_pending = state.leader_dictionary[lmh].keydown
|
||||||
|
|
||||||
state.keys_pressed.clear()
|
state.keys_pressed.clear()
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ diode_orientation = DiodeOrientation.COLUMNS
|
|||||||
unicode_mode = UnicodeModes.LINUX
|
unicode_mode = UnicodeModes.LINUX
|
||||||
tap_time = 200
|
tap_time = 200
|
||||||
leader_timeout = 2000
|
leader_timeout = 2000
|
||||||
DEBUG_ENABLE = True
|
debug_enable = True
|
||||||
|
|
||||||
emoticons = AttrDict({
|
emoticons = AttrDict({
|
||||||
# Emoticons, but fancier
|
# Emoticons, but fancier
|
||||||
@ -35,7 +35,7 @@ for k, v in emoticons.items():
|
|||||||
|
|
||||||
# ---------------------- Leader Key Macros --------------------------------------------
|
# ---------------------- Leader Key Macros --------------------------------------------
|
||||||
|
|
||||||
LEADER_DICTIONARY = {
|
leader_dictionary = {
|
||||||
(KC.F, KC.L, KC.I, KC.P): emoticons.ANGRY_TABLE_FLIP,
|
(KC.F, KC.L, KC.I, KC.P): emoticons.ANGRY_TABLE_FLIP,
|
||||||
(KC.C, KC.H, KC.E, KC.E, KC.R): emoticons.CHEER,
|
(KC.C, KC.H, KC.E, KC.E, KC.R): emoticons.CHEER,
|
||||||
(KC.W, KC.A, KC.T): emoticons.WAT,
|
(KC.W, KC.A, KC.T): emoticons.WAT,
|
||||||
|
@ -18,7 +18,7 @@ diode_orientation = DiodeOrientation.COLUMNS
|
|||||||
unicode_mode = UnicodeModes.LINUX
|
unicode_mode = UnicodeModes.LINUX
|
||||||
tap_time = 150
|
tap_time = 150
|
||||||
leader_timeout = 2000
|
leader_timeout = 2000
|
||||||
DEBUG_ENABLE = False
|
debug_enable = False
|
||||||
|
|
||||||
# -------------------------------Macros -----------------------------------------------
|
# -------------------------------Macros -----------------------------------------------
|
||||||
|
|
||||||
@ -41,7 +41,7 @@ for k, v in emoticons.items():
|
|||||||
# ---------------------- Leader Key Macros --------------------------------------------
|
# ---------------------- Leader Key Macros --------------------------------------------
|
||||||
|
|
||||||
gc.collect()
|
gc.collect()
|
||||||
LEADER_DICTIONARY = {
|
leader_dictionary = {
|
||||||
(KC.F, KC.L, KC.I, KC.P): emoticons.ANGRY_TABLE_FLIP,
|
(KC.F, KC.L, KC.I, KC.P): emoticons.ANGRY_TABLE_FLIP,
|
||||||
(KC.C, KC.H, KC.E, KC.E, KC.R): emoticons.CHEER,
|
(KC.C, KC.H, KC.E, KC.E, KC.R): emoticons.CHEER,
|
||||||
(KC.W, KC.A, KC.T): emoticons.WAT,
|
(KC.W, KC.A, KC.T): emoticons.WAT,
|
||||||
|
Loading…
Reference in New Issue
Block a user