2021-11-22

Visual Studio Code shortcut showing Unknown on Ubuntu

vscode, code, ubuntu, shortcut, unknown

banner

Image by Kranich17 from Pixabay

Introduction

Have you ever seen "unknown" while trying to set a keyboard shortcut?

vscode keyboard shortcut showing unknown

Or have you seen an underlined u or e after pressing a random keyboard shortcut?

underlined u

I will show you why it's happening and how to fix it.

Why

is it happening?
If you are using "ibus", the default global keyboard shortcuts will cause those problems.

ibus emoji preference setting
ℹ️ Note: You can open it with ibus-setup in terminal

You can see that there are two shortcuts set above.
The "Emoji annotations" shortcut is set to ctrl+..

If you've used VS Code, you will recognize it as a shortcut for "quick fix".

quick fix

When I pressed ctrl+., I was getting e so couldn't take advantage of it.

So How Do I Fix It?

Well you can either

  1. Delete global shortcuts
  2. Re-assign it

I deleted my shortcuts because I don't use them at all.

If you the changes isn't applied, restart ibus-daemon,
It will kill the existing session first if there is already one

1$ prompt> ibus-daemon &2[1] 580173current session already has an ibus-daemon.4[1]  + 58017 exit 255   ibus-daemon