mirror of
https://github.com/sezanzeb/input-remapper
synced 2024-11-04 12:00:16 +00:00
organized the archived xkb code
This commit is contained in:
parent
151a1f3173
commit
c76d4d4102
0
keymapper/archive/__init__.py
Normal file
0
keymapper/archive/__init__.py
Normal file
@ -19,9 +19,10 @@
|
|||||||
# along with key-mapper. If not, see <https://www.gnu.org/licenses/>.
|
# along with key-mapper. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
"""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:
|
Resources:
|
||||||
[1] https://wiki.archlinux.org/index.php/Keyboard_input
|
[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
|
# key-mapper will write target_keycode into /dev, while
|
||||||
# system_keycode should do nothing to avoid a duplicate keystroke.
|
# system_keycode should do nothing to avoid a duplicate keystroke.
|
||||||
print('writing', system_keycode, target_keycode, character)
|
|
||||||
if target_keycode is not None:
|
if target_keycode is not None:
|
||||||
if f'<{target_keycode}>' not in keycodes:
|
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
|
# don't append that one, otherwise X would crash when loading
|
||||||
continue
|
continue
|
||||||
xkb_symbols.append(
|
xkb_symbols.append(
|
@ -23,7 +23,7 @@ import os
|
|||||||
import unittest
|
import unittest
|
||||||
import shutil
|
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, \
|
create_identity_mapping, create_setxkbmap_config, \
|
||||||
get_preset_name, create_default_symbols, parse_symbols_file
|
get_preset_name, create_default_symbols, parse_symbols_file
|
||||||
from keymapper.paths import get_usr_path, KEYCODES_PATH, USERS_SYMBOLS
|
from keymapper.paths import get_usr_path, KEYCODES_PATH, USERS_SYMBOLS
|
||||||
|
@ -26,7 +26,7 @@ import time
|
|||||||
|
|
||||||
from keymapper.presets import find_newest_preset, rename_preset, \
|
from keymapper.presets import find_newest_preset, rename_preset, \
|
||||||
get_any_preset, delete_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 keymapper.paths import USERS_SYMBOLS
|
||||||
|
|
||||||
from test import tmp
|
from test import tmp
|
||||||
|
Loading…
Reference in New Issue
Block a user