/README.md

https://github.com/madslundt/keybindings · Markdown · 111 lines · 81 code · 30 blank · 0 comment · 0 complexity · aee6eb47e3c76595891c014b390d5f30 MD5 · raw file

  1. My preferred key bindings for both Linux and Windows.
  2. Make use of caps lock, remap arrow keys to { i, j, k, l } and extra stuff.
  3. For [Linux](#linux) and for [Windows](#windows)
  4. # Linux
  5. ## AutoKey
  6. [AutoKey](https://github.com/autokey/autokey) needs to be installed for Linux. This can be downloaded within Ubuntu package manager. The scripts can be found [here](linux/autokey).
  7. At first caps lock has to be changed to function as the **hyper** key. This can be done with **Gnome Tweak Tool**.
  8. | Shortcut | Output |
  9. | -------------------------------- | -------------------------------- |
  10. | CAPSLOCK + { i, j, k, l } | { Up, Left, Down, Right } |
  11. | CAPSLOCK + CTRL + { i, j, k, l } | ALT + { Up, Left, Down, Right } |
  12. | CAPSLOCK + ALT + { i, j, k, l } | CTRL + { Up, Left, Down, Right } |
  13. | CAPSLOCK + { u, o } | { Home, End } |
  14. | ALT + { i, k } | { PageUp, PageDown } |
  15. Move the scripts to the directory `~/.config/autokey/data/`.
  16. ## Terminator
  17. Terminator is used as a terminal and scripts can be found [here](linux/terminator).
  18. | Shortcut | Output |
  19. | --------------------------------------- | -------------------------------------------------------------- |
  20. | CAPSLOCK + CTRL + Alt { k, l } | Create new tab to the { bottom, right } |
  21. | CAPSLOCK + CTRL { i, j, k, l } | Focus the tab to the { top, left, bottom, right } |
  22. | CAPSLOCK + ALT + SHIFT + { i, j, k, l } | Increase/Decrease tab size to the { top, left, bottom, right } |
  23. | CTRL + Shift + w | Close tab |
  24. | CTRL + Shift + c | Copy text |
  25. | CTRL + Shift + v | Paste text |
  26. | ALT + { i, k } | { PageUp, PageDown } |
  27. Move the script to the directory `~/.config/terminator/`.
  28. ## Tilda
  29. Tilda is used as a dropdown terminal and the scripts can be found [here](linux/tilda).
  30. This adds the terminal to the op of the screen by pressing `CapsLock + T`.
  31. Move the script to the directory `~/.config/tilda/`.
  32. # Windows
  33. ## AutoHotKey
  34. [AutoHotKey](https://autohotkey.com) needs to be installed for Windows. The scripts can be found [here](windows/autohotkey).
  35. | Shortcut | Output |
  36. | -------------------------------- | -------------------------------- |
  37. | CAPSLOCK + { i, j, k, l } | { Up, Left, Down, Right } |
  38. | CAPSLOCK + ALT + { i, j, k, l } | CTRL + { Up, Left, Down, Right } |
  39. | CAPSLOCK + CTRL + { i, j, k, l } | ALT + { Up, Left, Down, Right } |
  40. | CAPSLOCK + { u, o } | { Home, End } |
  41. | ALT + { i, k } | { PageUp, PageDown } |
  42. | CAPSLOCK + { y, h } | { PageUp, PageDown } |
  43. ### Automatically start up
  44. 1. Find the script file, select it, and press Control-C.
  45. 2. Start **Run** and write `shell:startup`.
  46. 3. Right click and choose **Paste Shortcut**. The shortcut to the script should now be in the Startup folder.
  47. If you need to run it as administrator either make sure the scripts is set up to administrator or start Command Prompt as administrator and run the scripts within.
  48. ## CMDer
  49. | Shortcut | Output |
  50. | --------------------------------------- | -------------------------------------------------------------- |
  51. | CAPSLOCK + CTRL + Alt { k, l } | Create new tab to the { bottom, right } |
  52. | CAPSLOCK + CTRL { i, j, k, l } | Focus the tab to the { top, left, bottom, right } |
  53. | CTRL + Shift + w | Close tab |
  54. | CTRL + Shift + c | Copy text |
  55. | CTRL + Shift + v | Paste text |
  56. | ALT + { i, k } | { PageUp, PageDown } |
  57. Download font [FiraCode](https://github.com/tonsky/FiraCode) and [FlottFlott](https://www.dafont.com/flottflott.font)
  58. # macOS
  59. ## Karabiner-Elements
  60. [Karabiner-Elements](https://pqrs.org/osx/karabiner/index.html) needs to be installed for macOS. The `karabiner.json` file with the profile can be found [here](macOS/Karabiner).
  61. | Shortcut | Output |
  62. | --------------------------------------------------------- | --------------------------------------------------------- |
  63. | CAPSLOCK + { i, j, k, l } | { Up, Left, Down, Right } |
  64. | CAPSLOCK + COMMAND + { i, j, k, l, Backspace, Delete } | OPTION + { Up, Left, Down, Right, Backspace, Delete } |
  65. | CAPSLOCK + OPTION + { i, j, k, l, Backspace, Delete } | COMMAND + { Up, Left, Down, Right, Backspace, Delete } |
  66. | CAPSLOCK + { u, o } | { Home, End } (*) |
  67. | SHIFT + Backspace | Delete |
  68. * Home and End aren't very useful on macOS. Similar functionality can be achieved with OPTION + Up (start of line), and OPTION + Down (end of line).
  69. Note that those would be COMMAND + Up and COMMAND + Down with the provided bindings.
  70. ### Adding to Karabiner
  71. > :warning: **If you already use Karabiner**: follow the advanced steps to avoid loss of current settings.
  72. Copy [karabiner.json](macOS/Karabiner/karabiner.json) to your Karabiner config directory.
  73. This will result in Karabiner reading two profiles; 'Default macOS' and 'CAPSLOCK + IJKL'.
  74. Select 'CAPSLOCK + IJKL' and you are all set!
  75. #### Advanced: copying only the modifications
  76. If you already have your own profile and you only want to add the complex modifications, follow these steps.
  77. In [karabiner.json](macOS/Karabiner/karabiner.json) locate the profile 'CAPSLOCK + IJKL' and copy all the desired modifications from the 'rules' section (lines 153 to 844).
  78. # Git
  79. Helper tools for git
  80. ## Git alias
  81. [gitalias.txt](git/gitalias.txt) contain git aliases to be added to your git config.