# What is the best way to keyboard macros in Julia/VSCode?

**URL:** https://discourse.julialang.org/t/what-is-the-best-way-to-keyboard-macros-in-julia-vscode/74081
**Category:** New to Julia
**Tags:** question, vscode
**Created:** [January 5, 2022, 11:13am UTC](https://discourse.julialang.org/t/what-is-the-best-way-to-keyboard-macros-in-julia-vscode/74081 "2022-01-05T11:13:58Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Soldalma](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/soldalma/32/29388_2.png) [@Soldalma](https://discourse.julialang.org/u/Soldalma)
#### Post date: [January 5, 2022, 11:13am UTC](https://discourse.julialang.org/t/what-is-the-best-way-to-keyboard-macros-in-julia-vscode/74081/1 "2022-01-05T11:13:58Z")

</div>

I use `Autohotkey` to create keyboard macros (bindings) that can be quite useful. They do not seem to work inside the `Visual Studio Code` editor. The same key binding that works inside, say, `Notepad`, does not have any effect in the `Visual Studio Code` editor.

Questions:

1. Is there a way to fix this problem?
2. Is there a better way to create and use key bindings under Visual Studio Code?

---

<div class="post-metadata">

### Author: ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)
#### Post date: [January 5, 2022, 11:32am UTC](https://discourse.julialang.org/t/what-is-the-best-way-to-keyboard-macros-in-julia-vscode/74081/2 "2022-01-05T11:32:30Z")

</div>

Have you tried one of these [keymap VS Code extensions](https://marketplace.visualstudio.com/search?target=VSCode&category=Keymaps&sortBy=Relevance)? Linking also [this reference](https://code.visualstudio.com/docs/getstarted/keybindings?_lrsc=8254b004-5a2b-48ad-af57-5634a3ef99c2).

---

<div class="post-metadata">

### Author: ![Soldalma](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/soldalma/32/29388_2.png) [@Soldalma](https://discourse.julialang.org/u/Soldalma)
#### Post date: [January 5, 2022, 12:03pm UTC](https://discourse.julialang.org/t/what-is-the-best-way-to-keyboard-macros-in-julia-vscode/74081/3 "2022-01-05T12:03:40Z")

</div>

Most of these extensions have a preset menu of key bindings. I would like to use my own. `VSCode` has snippets but they are a “language” with a version per language like Julia or Python. I would like something simpler: just cut and paste formatted text I have saved somewhere. A key binding would give access to it, for example,

`mykeybinding;Space`

The `;Space` combination would tell `VSCode` to paste the code on the editor. The code would be someting like

```julia
for i in 1:n
    println(i)
end

```

and I could modify it (if necessary) after pasted on the editor.
