Fixed caps issue on leader_dictionary and debug_enable

This commit is contained in:
Kyle Brown 2018-10-11 19:35:41 -07:00
parent 37aeeac10a
commit 5313e5f5b5
6 changed files with 11 additions and 11 deletions

View File

@ -12,9 +12,9 @@ def main():
keymap = getattr(kmk_keyboard_user, 'keymap')
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
else:
from logging import ERROR as log_level

View File

@ -14,9 +14,9 @@ def main():
keymap = getattr(kmk_keyboard_user, 'keymap')
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
else:
from logging import ERROR as log_level

View File

@ -91,7 +91,7 @@ class InternalState:
self.unicode_mode = getattr(kmk_keyboard_user, 'unicode_mode', UnicodeModes.NOOP)
self.tap_time = getattr(kmk_keyboard_user, 'tap_time', 300)
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
def __enter__(self):

View File

@ -78,8 +78,8 @@ def process(state):
"""
lmh = tuple(state.leader_mode_history)
if lmh in state.LEADER_DICTIONARY:
state.macro_pending = state.LEADER_DICTIONARY[lmh].keydown
if lmh in state.leader_dictionary:
state.macro_pending = state.leader_dictionary[lmh].keydown
state.keys_pressed.clear()

View File

@ -16,7 +16,7 @@ diode_orientation = DiodeOrientation.COLUMNS
unicode_mode = UnicodeModes.LINUX
tap_time = 200
leader_timeout = 2000
DEBUG_ENABLE = True
debug_enable = True
emoticons = AttrDict({
# Emoticons, but fancier
@ -35,7 +35,7 @@ for k, v in emoticons.items():
# ---------------------- Leader Key Macros --------------------------------------------
LEADER_DICTIONARY = {
leader_dictionary = {
(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.W, KC.A, KC.T): emoticons.WAT,

View File

@ -18,7 +18,7 @@ diode_orientation = DiodeOrientation.COLUMNS
unicode_mode = UnicodeModes.LINUX
tap_time = 150
leader_timeout = 2000
DEBUG_ENABLE = False
debug_enable = False
# -------------------------------Macros -----------------------------------------------
@ -41,7 +41,7 @@ for k, v in emoticons.items():
# ---------------------- Leader Key Macros --------------------------------------------
gc.collect()
LEADER_DICTIONARY = {
leader_dictionary = {
(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.W, KC.A, KC.T): emoticons.WAT,