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

Cannot type backslash on German keyboard in Editor #18743

Closed
jpeinelt opened this issue Jan 18, 2017 · 8 comments
Closed

Cannot type backslash on German keyboard in Editor #18743

jpeinelt opened this issue Jan 18, 2017 · 8 comments
Assignees
Labels
keybindings VS Code keybinding issues *question Issue represents a question, should be posted to StackOverflow (VS Code)
Milestone

Comments

@jpeinelt
Copy link

  • VSCode Version: 1.8.1
  • OS Version: Windows 10 Pro

Steps to Reproduce:

  1. Open a file with VSCode and focus in the file
  2. Press AltGr-ß (AltGr is the right alt key on German keyboards) which should produce a backslash
  3. Nothing happens
    (3a. Open Find dialog with F3, press AltGr-ß ->produces backslash like it should)
@alexdima alexdima added the keybindings VS Code keybinding issues label Jan 20, 2017
@alexdima
Copy link
Member

Most likely there is something bound to that key combination.

@alexdima alexdima added this to the Backlog milestone Jan 20, 2017
@alexdima alexdima added the *question Issue represents a question, should be posted to StackOverflow (VS Code) label Jan 20, 2017
@jpeinelt
Copy link
Author

I know Atom had a similar bug at some time (atom/atom#1625) but I don't know if VSCode and Atom share any code within the editor. But at least they have in common that Ctrl+Alt maps somewhat to AltGr. And Ctrl+ß maps to un-indenting while Ctrl+Shift+ß maps to code folding

@alexdima
Copy link
Member

To find out what a keybinding does:

  1. Open Preferences > Keyboard Shortcuts
  2. Click on Define Keybinding
  3. Press your desired key combination
    (e.g. doing it for Ctrl+Shift+1):
    image
  4. Take note of the string shown inside the textbox (highlighted in purple above)
  5. Search for that string in the default keybindings and you shall find what it is bound to.

To remove a keybinding:

  1. Identify the keybinding you would like to remove (e.g:)
{ "key": "ctrl+shift+1",          "command": "editor.action.replaceOne",
                                     "when": "editorFocus && findWidgetVisible" },

2.a. Completely free up the keybinding. This will remove all the commands bound to "ctrl+shift+1". Write the following rule:

{ "key": "ctrl+shift+1" }

2.b. Completely remove a command. This will remove all keybindings associated with "editor.action.replaceOne". Write the following rule:

{ "command": "-editor.action.replaceOne" }

2.c. Remove that specific keybinding. Write the following rule:

{ "key": "ctrl+shift+1", "command": "-editor.action.replaceOne" },

Tip: Remember, in VS Code you can modify each and every keybinding to your liking, you are the sole master of your keyboard.

@jpeinelt
Copy link
Author

Thank you very much, I read through the Atom bug and your last answer and found the problematic keybinding.

{ "key": "ctrl+alt+[", "command": "paredit.wrapAroundSquare", "when": "editorTextFocus" },

This is marked with an (i) and maps to ctrl+alt+ß on a German layout. Now I have to decide if I finally get used to a international layout for programming or if I remap the binding :)

Is it possible to create a kind of a localized keybinding for a certain keyboard layout?

@alexdima
Copy link
Member

I'm happy you could identify the problematic keybinding and remove it.

We currently do not support having keyboard layout specific keybindings, #1240 tracks that.

@chuckleplant
Copy link

chuckleplant commented Mar 2, 2017

@alexandrudima , I have a similar issue, I cannot type # with a spanish keyboard. I could not find a related keybinding to altgr + 3 which types # in my kb layout. Info on my setup:

  • VSCode Version: Code 1.9.1 (f9d0c68, 2017-02-09T00:26:45.394Z)
  • OS Version: Windows_NT ia32 6.1.7601
  • Extensions:
Extension Author Version
cpptools ms-vscode 0.10.2

Steps to Reproduce:

  1. Open VSCode
  2. Try typing #, or any other Alt Gr + number combination (\|@#~€¬)
  3. Nothing appears on screen.

I looked at the similar atom issue but no luck.

@chuckleplant
Copy link

Actually, seems my OS keyboard layout was set as US instead of ES (spanish). My bad!

@gwagroves
Copy link

German keyboard on Mac OS with GitLens installed: alt+shift+7 types a backslash, but is mapped to GitLens search history dialog. Just change the keyboard mapping.

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
keybindings VS Code keybinding issues *question Issue represents a question, should be posted to StackOverflow (VS Code)
Projects
None yet
Development

No branches or pull requests

5 participants