Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
almino opened this issue Mar 14, 2017 · 9 comments
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug keyboard-layout Keyboard layout issues linux Issues with VS Code on Linux verified Verification succeeded
Milestone

Comments

@almino
Copy link

almino commented Mar 14, 2017

  • VSCode Version: Code 1.10.2 (8076a19, 2017-03-08T14:00:46.854Z)
  • OS Version: Linux x64 3.16.0-4-amd64
  • Extensions:
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.

@almino almino changed the title Can't bind Ctrl + / and Ctrl + ; to different commands. Can't bind Ctrl + / and Ctrl + ; to different commands on a Brazilian Keyboard. Mar 14, 2017
@MikeVelazcoMtz
Copy link

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

They share the same key in each layout

@almino
Copy link
Author

almino commented Mar 14, 2017

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

@MikeVelazcoMtz
Copy link

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
Copy link
Author

almino commented Mar 15, 2017

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 alexdima added keyboard-layout Keyboard layout issues linux Issues with VS Code on Linux labels Mar 24, 2017
@alexdima
Copy link
Member

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.

@alexdima alexdima added the bug Issue identified by VS Code Team member as probable bug label Mar 24, 2017
@alexdima alexdima added this to the March 2017 milestone Mar 24, 2017
@Tekbr
Copy link

Tekbr commented Mar 30, 2017

-- 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
Copy link
Member

@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
Copy link

Tekbr commented Mar 30, 2017

@alexandrudima Ok, I created the issue #23685

@roblourens roblourens added the verified Verification succeeded label Mar 31, 2017
@marcelorodrigo
Copy link

This bug still remains on 1.11.2

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug keyboard-layout Keyboard layout issues linux Issues with VS Code on Linux verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

6 participants