rbreaves / kinto

Mac-style shortcut keys for Linux & Windows.
http://kinto.sh
GNU General Public License v2.0
4.25k stars 213 forks source link

How to make caps-a as same ctrl-a? #730

Closed 17hao closed 1 year ago

17hao commented 1 year ago

After installation I get keybinds as those of macOS in Linux. Can I remap caps to ctrl so that I can tap caps-a to move cursor to the head of line?

rbreaves commented 1 year ago

You can, that behavior is defined in ~/.config/kinto/kinto.py & the sections of the code that mentions 'define_conditional_modmap'.

17hao commented 1 year ago

@rbreaves Thank you! Here is my solution:

--- kinto.py    2022-07-13 23:33:18.730915204 +0800
+++ kinto.py.back   2022-07-13 23:06:14.105317346 +0800
@@ -118,7 +118,6 @@
 # [Global modemap] Change modifier keys as in xmodmap
 define_conditional_modmap(lambda wm_class: wm_class.casefold() not in terminals,{

-    Key.CAPSLOCK: Key.LEFT_META,      
     # Key.CAPSLOCK: Key.RIGHT_CTRL,   # Caps2Cmd
     # Key.LEFT_META: Key.RIGHT_CTRL,  # Caps2Cmd - Chromebook

@@ -153,7 +152,6 @@

 # [Conditional modmap] Change modifier keys in certain applications
 define_conditional_modmap(re.compile(termStr, re.IGNORECASE), {
-    Key.CAPSLOCK: Key.LEFT_CTRL,      
     # - IBM
     # Key.LEFT_ALT: Key.RIGHT_CTRL,     # IBM
     # # Left Ctrl Stays Left Ctrl