Forward slash key not working in VS2019 code editor - keyboard

Since a few days (I don't know exactly when it started) the forward key in VS2019 is not working in the code editor. No matter how many times I press it, it doesn't do anything.
It also doesn't work in the seach box in the menu bar (labelled 'Search (Ctrl+Q)') nor in the search box which appears with Ctrl+F.
It does work in other places, like the solution explorer search box (Ctrl+;) and in the resource editor.
The forward slash is working in any other application that I tried (including Visual Studio Code and MS Excel). The question mark (Shift+/) is working everywhere, including in the code editor window. Even AltGr+/ is working (producing the Spanish upside down question mark).
I tried all other keys, including the AltGr combinations. They all work fine. Keyboard layout is US International.
The foward slash key doesn't work in the code editor when typing it on the laptop keyboard, and doesn't work when typing it on an external keyboard, or via an RDP session.
I am running Windows 10 Pro 64-bit, version 20H2, build 19042.685. System is up to date.
Visual Studio Professional 2019, 16.8.3, also up to date.
What is causing the forward slash key to fail?
How can I solve this problem?

(Too long for a comment.)
The OP indicated that the problem was resolved after resetting the keyboard shortcuts, which suggests that / was set as a keyboard shortcut either by accident or perhaps by an installed extension.
However, the question remains in such cases of how to identify what a particular keyboard shortcut is assigned to, in order to turn off just that one shortcut as opposed to resetting all.
Visual Studio does not appear to provide a place to see the list of all active keyboard shortcuts. An alternative is to go to Tools / Import and Export Settings / Export Selected / All Settings and save a .vssettings file with all the current settings. That is a plain text file with extended XML sections, and the keyboard shortcuts can be found under the following node (reformatted for readability):
<Category name="Environment_KeyBindings" ... >
<Version>16.0.0.0</Version>
<KeyboardShortcuts>
<DefaultShortcuts>
<Shortcut Command="View.ViewCode" Scope="Global">F7</Shortcut>
...
</DefaultShortcuts>
<UserShortcuts>
...
</UserShortcuts>
</KeyboardShortcuts>
</Category>
One of the <Shortcut> lines would have been listing / before the reset, and the Command attribute on that line indicated the assignment, so that it could be located and turned off individually in Tools / Options / Environment / Keyboard.

#dxiv Your comment made me check the shortcuts. Tedious job, scrolling through those hundreds of options). Nothing. Then I clicked the Reset button. That solved the problem.

In my case, the CodeRush extension was the guilty party. "Selection comment" gets set to use / upon installation. WTG DevExpress ......
https://docs.devexpress.com/CodeRushForRoslyn/120205/coding-assistance/selection-tools/comment-uncomment-selection
Update:
Also adding a screenshot of it in VS 2022 to help people find it:

Related

Can't activate shortcut on intellij products

Description
I'm using some intellij products (WebStorm, PHPStorm) and Android Studio and have the same issue with both of theses.
I have an azerty keyboard, with a french layout.
I can type without issue in these softs, but I can't activate shortcuts.
When I try to activate a shortcut (e.g ctrl+z), the activated shortcut is ctrl+w.
the shortcut is correctly triggered, but with the wrong keyboard layout. It seems that when I type, my french keyboard is used, but when I want to use a shortcut, the english layout seems to be used.
Is this a known bug (if so, I've not found any mentions about it), or did I miss something?
What I've tried
I'm running on Fedora 29, with Gnome 3.
I've tried to see if it wasn't reproductible with others softs (e.g firefox/ vscode), and I can't reproduce this.
I've tried to see if it wasn't based on my keyboard settings, so I ran xev to monitor the output of pressed keys. I can't reproduce this issue.
In intellij settings, I've tried to set Keymap > Prefer key position over key char with national layout both true and false, it doesn't seem to change anything.
Current situation
Here is an exemple of a shortcut definition in Android Studio.
I pressed A to Y keys on my french keyboard (which output A,Z,E,R,T,Y), and then press the same keys with ctrl (which output ctrl+Q instead of ctrl+A and so on)
https://imgur.com/a/U4aFd7F
Expected situation (tl;dr)
I expect that when I press ctrl+a, the shortcut triggered inside intellij products is ctrl+a instead of ctrl+q
It is indeed a known bug: https://youtrack.jetbrains.com/issue/IDEA-165950
In the bug report another workaround is mentioned for Gnome 3:
Re-order the languages in Settings > Language and Region tab, put English(US) first of the input source list.
I solved it by running setxkbmap fr. I don't know why this is required by intellij products, but it works.

VS Code keyboard layout change

I am using Visual Studio Code with English keyboard layout switched in Windows when programming, but when I am using my computer for general use I use Slovak keyboard layout. Sometimes it can get ridiculous when I switch from one to another multiple times in one minute. Is there a setting (or a plugin) that could set the keyboard layout in VS Code to English while Windows layout is still set to Slovak?
I will summarize for you the solution to this, hope it is still helpful for you or any other looking for this answer:
you have to press Ctrl+Alt+P
then in the display that will appear at the top, write the language you want in case it does not appear
once this is done, VSC will ask you to restart.
once restarted is done it should be fine.
It is the way to do it without changing windows configuration as you will see in ther similar posts.
Hope it helps

Visual Studio: CTRL-TAB doesn't always work

This post originally related to "Visual Studio", but affects other similar applications.
There are a number of posts dealing with a problem where the tab navigation panel appears but requires a click etc to dismiss. These seem to be solved by fiddling with the magnifyer, narrator etc. None of these solutions apply to my problem - which is that, in VS2012, ctrl-tab brings up the two-column navigation panel, repeated presses of tab moves through the lists as normal, but, on release of both keys, the focussed tab is NOT changed. With the nav panel displayed, you can click on it with the mouse and the focussed tab is changed as expected.
The issue seems to have arisen after installing VS2012. VS2010 is also installed and oddly now also exhibits the same problem, even though I have never had the problem until now. When you re-start VS, all works fine, but after a time ctrl-tab stops working normally. It has been seen to stop working without doing anything other than pressing ctrl-tab a few times i.e. not going to any other VS panel or doing a build etc.
This is a major problem with productivity as I use this constantly to switch between tabs. I know that I can change the shortcut to switch between documents without showing the navigation panel, but I prefer to see this panel, rather than switching 'blind'.
Does anyone know why this might be happening or how to fix it? I have done a full Windows update (Svr 2008 R2).
NOTE1 - I now see the same problem with a new installation of VS2013 and also in SQL Server Management Studio 2012 - on ctrl-tab you see the two-col panel but whatever you select doesn't change the pane in view (unless you click the panel with the mouse).
When ctrl-tab is not working in the VS-based apps, it DOES continue working in, say, Notepad++, which suggests an MS-VS problem.
NOTE2 - The problem does not exist when you use the on-screen keyboard! It seems that using the OSK causes ctr-tab to work again with the real keyboard, but it breaks quickly when you start almost any other application, but it always works with the OSK. The problem is unrelated to the physical keyboard as I have tried other keyboards.
Thanks

What could be causing Vim to switch keymaps randomly?

I've noticed a problem with Vim, where the keyboard mapping would unexpectantly change (to French I think, but I'm not sure). For example, the character 'É' appears when the key '?' is pressed.
My keyboard is set to English, and I don't have any other languages on my computer.
Restarting Vim fixes this problem temporarily, but the problem reappears after a while.
What could be causing this, and what can I do to fix it?
I found this blog post on the same problem. Apparently left-alt + shift will do it. Removing that from the Windows "Advanced Key Settings" dialog and/or removing all unwanted keymaps should fix the problem.
I am not on a Windows system at the moment so cannot verify this.
Update
I have tried it on a Windows system and can verify that this is the problem - alt+shift defaults to cycling through the all the keyboard configurations.
It can be changed from (deep breath...)
Control Panel -> Regional & Language Options -> Languages Tab -> Details button -> Key Settings -> Switch between input languages
Unselect both tickboxes on the final dialog.
I find it astonishing that anyone at Microsoft thought it would be a good idea to have a simple key combination that silently changes the keyboard mapping and other language settings, and only for the current program. How often has anyone wanted to do that?

Can't Copy & Paste in Eclipse 3.5

I recently updated my Eclipse to the latest release 3.5 and since then I have a very annoying problem with c&p using the shortcuts.
In an editor (xml, jsp, doesn't matter which one) I try to copy something and paste it somewhere else, nothing happens. When I cut out something and put it somewhere else I sometimes get something else (like a messed up part of my previous selection) or just some whitespaces. This gets even worse when I change lines in between.
First I thought that my keyboard is probably broken but it works just fine in other programs. Then I tried using the context menus' c&p and there it works. Yesterday I managed to get at least an error message when I tried to copy a file in the navigator from one project to another (the message was just "error using copy...bla". no details).
Does anyone else have this problem, or know how to solve it?
I am running on Kubuntu 9.04, and have quite some plugins installed (but only from the Galileo Updates Site), like Birt, Mylin, WST, or Subversive.
For my problem, I had to go to Window > Preferences > Java > Editor > Typing, and uncheck "Update imports"
This must be related to the key mapping, since those shortcuts are defined according to context.
(Column "When", in Preferences / General / Keys)
Check if those shortcuts do not work for any editor (do they work for Java editor?)
If they work for some editor, not for other, then some plugin settings must have re-affected them to another command.
This is caused by various X clipboard managers doing weird things with the clipboard. (bug report).
In XFCE the clipman applet was rolled in XFCE 4.8, and will be the source of these problems.
To fix this in XFCE - kill xfce4-settings-helper. You will need to use Settings Manager -> Session and Startup -> Session to kill it, as otherwise it may restart automatically.
To prevent this starting next time, you will need to remove it from your startup/login programs in Settings Manager > Session and Startup > Application Autostart.
Problem was solved with newer Eclipse releases. I think >= 3.6. Depending on your distribution there may be a (back)port of this (not on my Xubuntu 11.04) within the repositories.
So a tarball installation of Eclipse 4.0 works perfectly for me. Cut&Paste works and I am lucky that my plugins are compatible to 4.0.
Unfortunately Sublime Text has the same problems.
I read somewhere that in KDE maybe Klipper / "Klipper on the panel" conflicts with eclipse copy action.
It's a tool for clipboard history. Try to remove that! It may solve your problem :-/
For me the xfce4-settings-helper killing worked.
Workaround:
You can cut&paste from the compare view. So simply compare the un-copyable file (e.g., local history) with a different version and Control-C what you need there.
In the *.java editor page, right click and select open in text editor. Past your snippet there. Your Snippet will show in the *.java page'
I use Eclipse Kepler for PHP development. It's dumb I know.
None of the solutions suggested here has solved this source of frustration.
I can confirm the copy function works whether shortcut keys are bound or not. As I can copy from eclipse and paste into any other application. Except eclipse.
My solution. Accidental discovery: Eclipse Kepler will allow you to paste outside the php open and close tags and allow you to click and drag the highlighted block of content into into position.
Acceptable solution for small bits of code. Horribly crippling for larger development environments.
For Xming, this resolved the problem for me. In XLaunch uncheck Clipboard (clipboard manager) in the "Specify parameter settings" GUI form.

Resources