Visual Studio Code, cannot get simple text replacement to work

I have some very basic shortcuts set up in Keyboard Maestro. They work flawlessly everywhere except in Visual Studio Code, Microsoft’s new open source and free software for programmers.

What I am trying to achieve is simply to replace << with [ and >> with ] without using any kind of command key. If I use CTRL+< instead of << as a shortcut, it works.

I’m using AutoHotKey on Windows and Keyboard Maestro on OS X, and I have exactly the same problem in Visual Studio Code on both platforms.

Does anyone have any hints where I would start to debug such an issue?

Sorry, I don’t have any suggestions for you. It should work, but maybe Visual Studio Code is “eating” the “<<” before the system can trigger KM. Don’t know.

But may I ask you a few off-topic questions?

  1. Do you like Visual Studio Code?
  2. What languages do you use?
  3. Do you think it would be a good editor for JavaScript/JXA?

I had never heard of it before. But based on its web site, it looks very powerful.

Thanks, and good luck in resolving your KM issue.

I like Visual Studio Code, but this issue with Keyboard Maestro is making me consider trying Sublime Text instead.

The reason why I started using VSCode is my background as .NET programmer. I use Visual Studio every day at work, so when I wanted a more lightweight editor, I started using VSCode.

I use VSCode for HTML, CSS, JavaScript and TypeScript.

1 Like

Thanks for sharing.

Hey Bjarte,

The appended macro seems to work reliably.

I also had success using insert-text-by-pasting.

Peter would have to look and see if he can figure out why those deletes are eating the typed-text.

Typinator had no problem using “<<” as the abbreviation for “[”, so there may be something he can do.

-Chris


Generic-Test 01.kmmacros (2.0 KB)

Thanks for testing.

When I tried today, my macros worked. Maybe the latest update to VS Code fixed the issue.

I have tested mostly on Windows lately. I think the issue is still there, but on OS X it seems to be fixed.

/Bjarte