tweak the debug output to make them more readable

This commit is contained in:
crazyiop 2022-06-11 23:08:10 +02:00 committed by xs5871
parent 614961521d
commit 6068b60cac

View File

@ -68,17 +68,17 @@ class KMKKeyboard:
# tight on RAM so.... # tight on RAM so....
def __repr__(self): def __repr__(self):
return ( return (
'KMKKeyboard(' 'KMKKeyboard(\n'
'debug_enabled={} ' ' debug_enabled={}, '
'diode_orientation={} ' 'diode_orientation={}, '
'matrix={} ' 'matrix={},\n'
'unicode_mode={} ' ' unicode_mode={}, '
'_hid_helper={} ' '_hid_helper={},\n'
'keys_pressed={} ' ' keys_pressed={},\n'
'coordkeys_pressed={} ' ' coordkeys_pressed={},\n'
'hid_pending={} ' ' hid_pending={}, '
'active_layers={} ' 'active_layers={}, '
'timeouts={} ' 'timeouts={}\n'
')' ')'
).format( ).format(
self.debug_enabled, self.debug_enabled,
@ -141,7 +141,7 @@ class KMKKeyboard:
int_coord = kevent.key_number int_coord = kevent.key_number
is_pressed = kevent.pressed is_pressed = kevent.pressed
if self.debug_enabled: if self.debug_enabled:
print('MatrixChange(ic={} pressed={})'.format(int_coord, is_pressed)) print('\nMatrixChange(ic={}, pressed={})'.format(int_coord, is_pressed))
key = None key = None
if not is_pressed: if not is_pressed: