Skip to content

Commit

Permalink
refactor(stringy_keymaps): use debug instead of print
Browse files Browse the repository at this point in the history
  • Loading branch information
xs5871 committed Feb 6, 2025
1 parent 95c65c0 commit 930cc0a
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions kmk/extensions/stringy_keymaps.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
from kmk.extensions import Extension
from kmk.keys import KC
from kmk.utils import Debug

debug = Debug(__name__)

class StringyKeymaps(Extension):
#####
# User-configurable
debug_enabled = False

class StringyKeymaps(Extension):
def on_runtime_enable(self, keyboard):
return

Expand All @@ -20,10 +19,10 @@ def during_bootup(self, keyboard):
replacement = KC.get(key)
if replacement is None:
replacement = KC.NO
if self.debug_enabled:
print(f"Failed replacing '{key}'. Using KC.NO")
elif self.debug_enabled:
print(f"Replacing '{key}' with {replacement}")
if debug.enabled:
debug('Failed replacing ', key, '. Using KC.NO')
elif debug.enabled:
debug('Replacing ', key, ' with ', replacement)
layer[key_idx] = replacement

def before_matrix_scan(self, keyboard):
Expand Down

0 comments on commit 930cc0a

Please sign in to comment.