There’s a lot of little things that take up some of our brain processes, but there’s a lot of things that our muscle memory can do. In switching back and forth between individual application, for example, when after open the application more than 3, the mouse or the Tab key may be busy don’t come over, before the key switch will also have to find the corresponding application (in other words, when switching application process takes up extra eyes) this article is to share how I apply switching operation to muscle memory, The following apps are used (macOS)

  • Karabiner-elements (KE may be used instead)
  • Keyboard Maestro (KM may be substituted below)
  • Thor

Karabiner-Elements

To do a good job, we must sharpen our tools first, first of all, our keyboard remediation.

Karabiner-elements is a powerful key change application for MacOS. Here we’re using it to change some keys that we don’t really need. For example, the right command, right option and right shift keys in the keyboard are all the keys in the keyboard. From the beginning to the end of the computer, you can hardly press them a few times, but they occupy a very good position in the keyboard, which is a bit like occupying the manger, so why not change them?

F19 hyper Key hyper Key Hyper Key Hyper Key hyper Key hyper Key hyper Key hyper Key hyper Key Hyper Key Hyper Key

Start by installing the app, either through the website or Homebrew

brew install karabiner-elements
Copy the code

Open it after installationThis web site.

You can see that there are a lot of Change key presets listed here, you can find one you like, or similar click import, here select Change Caps_lock Key (Rev4). If you already have KE installed, click and it will automatically prompt you whether to open KE.

Once opened, click Import.And then you’re going to go to this screen, so you can just arbitrarily select Enable, but you’re going to change it anyway.After the complex modifications, there is an additional rule under the Tab.

Here the default caps_lock changed, in fact, also quite good. Caps_lock is relatively easy to reach and press with your little finger, so it’s ideal for key combinations with other keys. After all, it is used to switch case, so it is not good to use as a custom function key alone (KE can be configured to work when pressed alone or in combination with other keys).

Now let’s talk about how to change this key to right command.

Open the following file.

~/.config/karabiner/karabiner.json
Copy the code

This file is the KE configuration file where the results of the above operations will eventually be written. Notice that long description, that’s what we just did. You can follow the steps above to introduce a few more and have a look at them and almost understand the syntax of the configuration file. In this case, as requested, just change caps_lock to right_command.

{
  "global": {
      "check_for_updates_on_startup": true."show_in_menu_bar": true."show_profile_name_in_menu_bar": false
  },
  "profiles": [{"complex_modifications": {
              "parameters": {
                  "basic.simultaneous_threshold_milliseconds": 50."basic.to_delayed_action_delay_milliseconds": 500."basic.to_if_alone_timeout_milliseconds": 1000."basic.to_if_held_down_threshold_milliseconds": 500
              },
              "rules": [{"description": "Change caps_lock key to command+control+option+shift. (Post f19 key when pressed alone)"."manipulators": [{"from": {
                                  "key_code": "caps_lock"./ / right_command instead
                                  "modifiers": {
                                      "optional": [
                                          "any"]}},"to": [{"key_code": "left_shift"."modifiers": [
                                          "left_command"."left_control"."left_option"]}],"to_if_alone": [{"key_code": "f19"}]."type": "basic"}]}]},"devices": []."name": "Default profile"."selected": true."simple_modifications": []."virtual_hid_keyboard": {
              "country_code": 0}}}]Copy the code

Once you’ve changed the right command, you can then change the right option, the right shift, or even the left option

I’m done here. After that is to give you a good key allocation command, it depends on your needs, such as I putThe command rightTo theAlfred.The right optionTo theiTerm2. After binding, you can happily activate the App window with one click.

One problem is that not all apps offer the ability to set up a shortcut activation window like Alfred does. This requires the assistance of the following APP

Thor

This is very simple to use. Select app and bind the key. The bound APP can be started and activated by the shortcut key.

Another problem you might run into is that neither App nor Thor, which provides shortcut key activation, can directly bind modifier keys like Option (they must be combined with other non-modifier keys). The solution is Thor + KE coordination, which is the one-to-many modification of the right command in the example in this paper.

The app is very lightweight and easy to use, but there is one problem: MY hands are weak. Nothing like random keyboard shortcuts, so always open the software you don’t want by mistake.

That’s why I switched to the following one

Keyboard Maestro

Keyboard Maestr is an automation software of macOS, which has many functions. This article only uses it to bind App shortcut keys

You can see the one on the right hereactionIn, shortcut key activation App can write conditional branches. What I wrote here is, if the app is currently running, activate the app, otherwise I don’t do anything, which perfectly solves my weak hand problem

I won’t go into details on how to use it. It’s a bit like Alfred’s Workflow, which can be used with various actions and supports scripts in many languages. Here I’m going to provide my own shortcut binding Marcos that I’m currently using and import it directly.

Link: pan.baidu.com/s/1yNW8tP-E… Password: 761 o

There are also some resources provided by the community, find what you want, I believe that after watching a few Marco, you can imitate the gourd.

Wiki.keyboardmaestro.com/Macro_Libra… .

Forum.keyboardmaestro.com/t/best-macr…

One last question

The last question is memorizing shortcut keys. My friend and I don’t like memorizing shortcut keys when we use amway.

I basically added shortcut keys for all my commonly used apps, about a dozen or so, which were added slowly due to some operation difficulties in the process of work, so I did not remember the cost of shortcut keys. Once the key change + binding is complete and the configured shortcut key has formed muscle memory, you can switch back and forth between apps as you type. In other words, a command from your brain can be delivered directly to your finger with the help of a keyboard shortcut, without having to bother the rest of your brain.

In fact, just like memorizing Vim’s commands, this kind of thing is not to memorize all at once and then use, but to use slowly in the work, natural master, may need to step out of their comfort zone in the process.

Share uncle Mouse’s concise VIM training guide