refactor debug output
This commit is contained in:
parent
642790b2e7
commit
fb5ecf7e38
@ -135,9 +135,6 @@ class KMKKeyboard:
|
|||||||
if not layer_key or layer_key == KC.TRNS:
|
if not layer_key or layer_key == KC.TRNS:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if self.debug_enabled:
|
|
||||||
print('KeyResolution(key={})'.format(layer_key))
|
|
||||||
|
|
||||||
return layer_key
|
return layer_key
|
||||||
|
|
||||||
def _on_matrix_changed(self, kevent):
|
def _on_matrix_changed(self, kevent):
|
||||||
@ -151,17 +148,20 @@ class KMKKeyboard:
|
|||||||
try:
|
try:
|
||||||
key = self._coordkeys_pressed[int_coord]
|
key = self._coordkeys_pressed[int_coord]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
print(f'KeyNotPressed(ic={int_coord})')
|
|
||||||
if self.debug_enabled:
|
if self.debug_enabled:
|
||||||
print('PressedKeyResolution(key={})'.format(key))
|
print(f'KeyNotPressed(ic={int_coord})')
|
||||||
|
|
||||||
if key is None:
|
if key is None:
|
||||||
key = self._find_key_in_map(int_coord)
|
key = self._find_key_in_map(int_coord)
|
||||||
|
|
||||||
if key is None:
|
if key is None:
|
||||||
|
if self.debug_enabled:
|
||||||
print('MatrixUndefinedCoordinate(ic={})'.format(int_coord))
|
print('MatrixUndefinedCoordinate(ic={})'.format(int_coord))
|
||||||
return self
|
return self
|
||||||
|
|
||||||
|
if self.debug_enabled:
|
||||||
|
print('KeyResolution(key={})'.format(key))
|
||||||
|
|
||||||
self.pre_process_key(key, is_pressed, int_coord)
|
self.pre_process_key(key, is_pressed, int_coord)
|
||||||
|
|
||||||
def pre_process_key(self, key, is_pressed, int_coord=None):
|
def pre_process_key(self, key, is_pressed, int_coord=None):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user