diff --git a/keymapper/archive/__init__.py b/keymapper/archive/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/keymapper/archive.py b/keymapper/archive/xkb.py similarity index 96% rename from keymapper/archive.py rename to keymapper/archive/xkb.py index 0a4912ca..ff14c012 100644 --- a/keymapper/archive.py +++ b/keymapper/archive/xkb.py @@ -19,9 +19,10 @@ # along with key-mapper. If not, see . -"""Quite some code that is not used anymore, but might be in the future. +"""Code that is not used anymore, but might be in the future. -Currently it is not needed to create symbols files in xkb. Very sad. +Currently it is not needed to create symbols files in xkb. Which is a pity +considering all the work put into this. This stuff is even unittested. Resources: [1] https://wiki.archlinux.org/index.php/Keyboard_input @@ -198,10 +199,11 @@ def generate_symbols( # key-mapper will write target_keycode into /dev, while # system_keycode should do nothing to avoid a duplicate keystroke. - print('writing', system_keycode, target_keycode, character) if target_keycode is not None: if f'<{target_keycode}>' not in keycodes: - logger.error(f'Unknown code <{target_keycode}> for "{character}"') + logger.error( + f'Unknown code <{target_keycode}> for "{character}"' + ) # don't append that one, otherwise X would crash when loading continue xkb_symbols.append( diff --git a/tests/testcases/config.py b/tests/testcases/config.py index 7d3e7c26..fde4aa19 100644 --- a/tests/testcases/config.py +++ b/tests/testcases/config.py @@ -23,7 +23,7 @@ import os import unittest import shutil -from keymapper.xkb import custom_mapping, generate_symbols, \ +from keymapper.archive.xkb import custom_mapping, generate_symbols, \ create_identity_mapping, create_setxkbmap_config, \ get_preset_name, create_default_symbols, parse_symbols_file from keymapper.paths import get_usr_path, KEYCODES_PATH, USERS_SYMBOLS diff --git a/tests/testcases/presets.py b/tests/testcases/presets.py index 5d92e7c4..3f087353 100644 --- a/tests/testcases/presets.py +++ b/tests/testcases/presets.py @@ -26,7 +26,7 @@ import time from keymapper.presets import find_newest_preset, rename_preset, \ get_any_preset, delete_preset -from keymapper.xkb import create_preset +from keymapper.archive.xkb import create_preset from keymapper.paths import USERS_SYMBOLS from test import tmp