Fixing Ctrl+Backtick in VSCode

Yesterday, I encountered this issue while coding with Visual Studio Code. The default terminal shortcut Ctrl+` didn't work on my new laptop. After some research, I learned that some CJK keyboards/IMEs may reserve it for internal use, and the reserved key can still be used globally. So I tried to write a fixer to register it as a global hotkey and forward its keypress messages. Fortunately, it worked.

While it would be ideal to implement the fixer as a VSCode extension, I'm not familiar with front-end development. Currently, the fixer runs continuously in the background whenever the system is running, leading to some unnecessary troubles:

  • The message forwarding is achieved by a simple mimicking. Sometimes it causes unexpected behavior in other programs.
  • Users may play games, and it would be disastrous if the fixer were identified as a cheat program.

To tackle these troubles, the fixer implements a naive detection. It operates only if the title of the active window ends with - Visual Studio Code or - VSCode.

Recently, I struggled to learn about the basics of VSCode extension development and finally wrapped the fixer into an extension. It works well and also avoids the negative effects caused by the non-extension one.

Today, I discovered that the root cause lies in the "Switch to this IME" option in the IME settings, which occupies Ctrl+` by default. And disabling it just solved the issue. So, all my previous work has been pointless all along. What a dramatic turn of events...