Keyboard macros for everyday tasks


    Among society, it somehow happened that the recording of macros on the keyboard is a purely gaming need and is often found only on gaming keyboards.

    But in fact it is just a record of the sequence of keystrokes.

    So why not use them for ordinary actions. And especially in the environment of blind users, when using the mouse is extremely inconvenient, and all navigation in windows windows is done using only one keyboard.


    I will try to give a couple of examples to understand.

    Variants of the necessary sequences can certainly come up with a great many.

    1. Opening the console in the current explorer folder

    Surely, many people know that if you click the right mouse button on an empty place in the Explorer while holding the shift key, then in the opened context menu you can select the “Open command window” item.

    To call the context menu on the keyboard there is also a special menu key.

    The main thing is to use it from scratch without selecting any object.

    To do this, you can first use a simple method of going to the parent folder and returning back.

    Then the macro will look like this:

    стрелка_вниз на необходимое количество раз до нужного пункта

    2. Running a code check for code type compliance

    When programming, it is useful to check your code for compliance with the established styles of code design and the flake8 utility is interesting for this.

    Then to check the code with its help in the console opened by the previous macro, you can write to memory:

    flake8 %CD% > flake8.log

    After checking in the folder, a log file will be recorded, walking along which you can quickly correct your shortcomings.


    This article is not a guideline.

    The purpose of this article is to discuss the utility and disadvantages of programmable keyboard macros, not for games, but for other tasks.

    From the positive, I can note the convenience of performing any frequently repeated tasks by pressing just one button.

    Among the shortcomings: the keyboard reproduces the sequence with the same speed and delay between clicks as you entered when recording.

    From the macro I would like to play with greater speed. Can someone in the comments tell you whether you can somehow get around this nuance.

    Also popular now: