seems to be working again

xkb
sezanzeb 4 years ago committed by sezanzeb
parent 8a496644eb
commit d93e7f271b

@ -96,7 +96,7 @@ class Mapping:
"""
print('change', previous_keycode, new_keycode, character)
if new_keycode and character and new_keycode != previous_keycode:
self.add(new_keycode, character)
self._mapping[new_keycode] = character
if new_keycode != previous_keycode:
# clear previous mapping of that code, because the line
# representing that one will now represent a different one.

@ -114,6 +114,11 @@ class Integration(unittest.TestCase):
gtk_iteration()
self.assertEqual(self.window.selected_preset, 'new preset')
self.assertListEqual(
sorted(os.listdir(f'{tmp}/symbols/device_1')),
['new_preset', 'new_preset_2']
)
# now try to change the name
self.window.get('preset_name_input').set_text('abc 123')
gtk_iteration()
@ -132,7 +137,7 @@ class Integration(unittest.TestCase):
)
self.assertListEqual(
sorted(os.listdir(f'{tmp}/symbols/device_1')),
['abc_123', 'new_preset', 'new_preset_2']
['abc_123', 'new_preset_2']
)

Loading…
Cancel
Save