Created
June 27, 2019 02:02
-
-
Save netmarkjp/43e0dd409e3f4396a6f90bbe8519459c to your computer and use it in GitHub Desktop.
Muhenkan treat like Alt ( only when combined usecase)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" config """ | |
import re | |
from xkeysnail.transform import K | |
from xkeysnail.transform import Key | |
from xkeysnail.transform import define_keymap | |
from xkeysnail.transform import define_modmap | |
from xkeysnail.transform import define_multipurpose_modmap | |
define_modmap({ | |
Key.CAPSLOCK: Key.LEFT_CTRL | |
}) | |
define_multipurpose_modmap({ | |
Key.MUHENKAN: [Key.MUHENKAN, Key.LEFT_ALT], | |
}) | |
APPLY_EMACSKEYS_WM_CLASSES = [ | |
"Chromium", | |
"Google-chrome", | |
"Slack", | |
"copyq", | |
] | |
define_keymap(re.compile("|".join(APPLY_EMACSKEYS_WM_CLASSES), flags=re.I), { | |
K("C-b"): K("Left"), | |
K("C-f"): K("Right"), | |
K("C-p"): K("Up"), | |
K("C-n"): K("Down"), | |
K("C-a"): K("Home"), | |
K("C-e"): K("End"), | |
K("C-k"): [K("Shift-End"), K("Ctrl-x")], | |
K("C-d"): K("Delete"), | |
K("C-h"): K("BackSpace"), | |
K("Alt-a"): K("Ctrl-a"), | |
K("Alt-f"): K("Ctrl-f"), | |
}, "") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment