Search code examples
visual-studio-codeelixirkeyboard-shortcuts

Can VS Code input text when I type a rapid shift shift sequence?


So, my new keyboard doesn't have the pipe key, and I use it frequently (I'm learning elixir right now). I know that alt + 124 produces |, but it is a bit annoying to type it every time I want to use |> on elixir.

Is it possible to configure a shortcut (thought about something like shift shift) to insert |> in the editor?


Solution

  • Microsoft has its own tool to create custom layouts.

    Microsoft Keyboard Layout Creator 1.4 Download.

    Here is a brief how-to gracefully stolen from MakeUseOf

    • Open the Microsoft Keyboard Layout Creator app.
    • Head to File > Load Existing Keyboard.
    • Pick the layout you want to customize. You should make sure you pick the layout that matches your current keyboard setup, for example, QWERTY (U.S.).
    • Go to File > Save Source File As so you have a backup before you start making changes.
    • Set your new keyboard’s parameters in Project > Properties. You can pick a language and give the keyboard a name and description.
    • Click on a key and follow the on-screen prompt to remap it to a character of your choosing.

    Assigning control keys combinations to input letters is not possible, AFAIK. Just set it so Shift+Something or to any 3rd level key. BTW, I am pretty sure your current 3rd level already has a pipe, to test it press the right Alt (also called AltGr) and press all the alphanumeric keys.