-
Notifications
You must be signed in to change notification settings - Fork 224
Description
So you want to contribute? That's great!
Kinto now officially uses xkeysnail as its preferred method of key remapping.
Clone master or fork master
git clone https://github.com/rbreaves/kinto.git
GUI Keys
Value | Description | Mac/Kinto Equivalent |
---|---|---|
C,Ctrl | Control | Cmd |
M,Alt | Alt/Option | Alt/Option |
Super | Win/Super | Ctrl |
Terminal Keys
Value | Description | Mac/Kinto Equivalent |
---|---|---|
RC,RCtrl | Right Control on Left & Right Alt/Cmd key | Cmd |
M,Alt | Alt/Option | Alt/Option |
Ctrl | Ctrl | Ctrl |
You can define new keymaps for your specific app via this method. You also do not have to cancel out the original keybinding if you do not need or want to, but you can do so with "pass_through_key".
Defining Keymaps Per App
# Keybindings for Sublime Text
define_keymap(re.compile("Sublime_text"),{
K("C-h"): pass_through_key, # cancel replace
K("Ctrl-Alt-f"): K("Ctrl-h"), # replace
K("C-M-v"): [K("C-k"), K("C-v")], # paste_from_history
}
In the above example I am also showing that you can define a single shortcut to enact multiple shortcut keys if needed by defining an array of shortcuts to trigger.
You can also make your changes in the ~/.config/kinto/kinto.py location and then restart Kinto. The system also has Edit Config built in now.
More information can be seen on the readme page of xkeysnail.
Note on submitting keymaps for consideration
If it is a basic system level keymap then please consult ticket #44 and the excel doc to ensure that you are aware of all of the possibly differing hotkeys between DE's before submission and try to account for them in the setup.py and kinto.py file.
If it is more DE, application or language specific and then considering commenting it out in the kinto.py config file. This will allow me, or you, to create it as an installable option in xkeysnail_service.sh.
An example
# K('Shift-KEY_3'):K('KEY_EURO'), # UK KBD
XKB Shortcut Creation
The older xkb shortcut method info can be read about in ticket #125.