skip to Main Content

I have a Raspberry Pi 4B+ on which I have installed Debian Buster. I installed VSCode and it does not handle some characters properly. For example r->{tab}, e->{backspace}. I had installed with a bunch of extensions and had the above problem. I uninstalled and got rid of all the vestiges of configuration and extensions I could find. I then reinstalled VSCode and the problem persists. I set Developer: Toggle Keyboard Shortcuts Troubleshooting and got the following log entries for the r key:

2023-05-17 12:06:31.464 [info] [KeybindingService]: / Soft dispatching keyboard event
2023-05-17 12:06:31.466 [info] [KeybindingService]: | Resolving [Tab]
2023-05-17 12:06:31.467 [info] [KeybindingService]:  From 9 keybinding entries, matched tab, when: editorTextFocus && !editorReadonly && !editorTabMovesFocus, source: built-in.
2023-05-17 12:06:31.469 [info] [KeybindingService]: / Received  keydown event - modifiers: [], code: Tab, keyCode: 82, key: r
2023-05-17 12:06:31.470 [info] [KeybindingService]: | Converted keydown event - modifiers: [], code: Tab, keyCode: 48 ('R')
2023-05-17 12:06:31.471 [info] [KeybindingService]: | Resolving [Tab]
2023-05-17 12:06:31.472 [info] [KeybindingService]:  From 9 keybinding entries, matched tab, when: editorTextFocus && !editorReadonly && !editorTabMovesFocus, source: built-in.
2023-05-17 12:06:31.474 [info] [KeybindingService]: + Invoking command tab.

Somehow, earlier, I dumped the System keybindings.json file. I don’t remember how. At any rate I did see an entry with "tab" as the key and several data keys with variants of "r" as the value.

I am using ssh -Y to log into the RPi, I enter code (full VS Code) and code displays in a XQuartz(X11) window back on my Mac. My VSCode install is from code_1.78.2-1683731061_arm64.deb.

Note that I am also running VSCode on my MacBook and it has no problems.

I have also used code tunnel from vscode_cli_alpine_arm64_cli.tar.gz on the RPi and VSCode on my Mac with Remote Explorer: Focux on Remote View. In this case the keybindings work properly. However, this arrangement is not convenient as I’m using https://github.com/project-chip/connectedhomeip/blob/master/docs/VSCODE_DEVELOPMENT.md and this uses the Dev Containers extension and Docker and is difficult to figure out what to install where.

2

Answers


  1. Chosen as BEST ANSWER

    The problem is in Settings. Go to Settings and search for dispatch. (Since your keyboard is not acting correctly you may need to enter "dispatch" somewhere else and use cut-paste to put it in the search.) For Keyboard: Dispatch, change the value from code to keyCode.

    See https://github.com/microsoft/vscode/wiki/Keybinding-Issues where the section "Are you connecting to the Linux machine via some form of virtualization or remote desktop software?" describes what to do even if the problem description may not seem to fit.


  2. Unless you have other reasons to be running VS Code on the RPi, I’d suggest to run it on your SSH client machine and use the remote-ssh extension of VS Code. See also https://code.visualstudio.com/docs/remote/ssh. I don’t know why this is happening with your setup, but something weird must be happening with passing inputs between your SSH client and host- perhaps related with the specific software you’re using (Ex. XQuartz).

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search