microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.63k stars 29.04k forks source link

Can't bind Ctrl + / and Ctrl + ; to different commands on a Brazilian Keyboard. #22626

Closed almino closed 7 years ago

almino commented 7 years ago
Extension Author Version
empty-indent DmitryDorofeev 0.2.0
beautify HookyQR 1.0.1
crane HvyIndustries 0.3.3
code-settings-sync Shan 2.5.1
php-formatter Sophisticode 0.2.4
npm-intellisense christian-kohler 1.3.0
gitignore codezombiech 0.5.0
vscode-html-css ecmel 0.0.33
php-debug felixfbecker 1.10.0
file-icons file-icons 1.0.3
vscode-sort henriiik 0.2.5
phpcs ikappas 0.7.0
indentation-level-movement kaiwood 1.1.1
vscode-colorize kamikillerto 0.3.2
vue liuji-jim 0.1.5
camelcasenavigation maptz 0.2.3
code-beautifier michelemelluso 1.6.2
vscode-duplicate mrmlnc 1.1.0
debugger-for-chrome msjsdiag 2.6.0
php-docblocker neilbrayfield 0.2.0
vetur octref 0.5.1
advanced-new-file patbenatar 0.4.0
gotolastedit plrenaudin 0.2.1
gitlink qezhu 0.2.0
laravel-artisan ryannaddy 0.0.6
ci-snippets secato 0.0.1
php-ci small 0.1.3
guides spywhere 0.7.0
autoimport steoates 1.2.2
autoend thousandtyone 1.0.16 ;

Steps to Reproduce:

  1. Edit keybindings.json
  2. Click Define Keybinding (Ctrl + K Ctrl + K)
  3. Press Ctrl + / on a Brazilian Keyboard

Expected: Keys showed should be Ctrl + /

Result: Keys showed is Ctrl + ;

Details: I want to set different shortcuts for those combinations of keys, but I can't. For VS Code, Ctrl + ; and Ctrl + / are the same damn thing. By default, pressing these keys, VS Code toggle comments on a line. I want Ctrl + ; to put a semicolon at the end of the line. And Ctrl + / to toggle comments.

MikeVelazcoMtz commented 7 years ago

Don't you switch between English and Brazilian keyboard layouts?

They share the same key in each layout

almino commented 7 years ago

I won't change keyboard layout for the whole system. Is there a way to do it on VS Code?

MikeVelazcoMtz commented 7 years ago

But if you switch between both keyboard layouts it could be possible to press accidentally Ctrl+; thinking that you are pressing Ctrl+/.

That's what I mean.

almino commented 7 years ago

I changed the layout to English. The Define Keybinding (Ctrl + K Ctrl + K) dialog outputed oem_102 when I pressed /. And / when I pressed ;.

{
  "key": "ctrl+oem_102",
  "command": "editor.action.commentLine",
  "when": "editorTextFocus && !editorReadonly"
}

The code above doesn't work. It toggle comments on a line, when I press both combinations.

Brazilian Keyboard layout doesn't share the same key for ; adn /. 89b0f155-7608-4130-bbe6-44246c7290ff

alexdima commented 7 years ago

I have validated that we now (i.e. after PR #22894 aka #17521 -- in today's/tomorrow's Insiders build) appear to behave correctly for this keyboard layout

image

image

When pressing the scan code combination Ctrl+[Period] (red highlight): image

When pressing the scan code combination Ctrl+[Slash] (blue highlight): image


This makes me believe the fix in PR #22894 aka #17521 resolves this issue. Please double check in tomorrow's insiders build.

Tekbr commented 7 years ago

-- Sorry for the English, I used Google Translator --

@alexandrudima I tried to set, but for me still show the wrong or unknown keys.

OS Version: Windows 10 Brazilian Keyboard

Had any more updates on the insiders about?

I'm with bc9a7bb 2017-03-30T08: 11: 58.005Z

alexdima commented 7 years ago

@Tekbr The OP was using Linux and it appears you are using Windows. Things vary a lot from operating system to operating system, especially related to keyboard layouts.

Can you please create a separate issue with the exact problem you are running into?

Tekbr commented 7 years ago

@alexandrudima Ok, I created the issue #23685

marcelorodrigo commented 7 years ago

This bug still remains on 1.11.2