mirror of
https://github.com/sezanzeb/input-remapper
synced 2024-11-20 03:25:43 +00:00
seems to be working again
This commit is contained in:
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…
Reference in New Issue
Block a user