Fixed caps issue on leader_dictionary and debug_enable
This commit is contained in:
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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):
|
||||
|
@@ -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()
|
||||
|
||||
|
Reference in New Issue
Block a user