-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
Using capslock in a keybinding still toggles capslock #13312
Comments
Just realized this may not be (trivially) possible due to how Windows deals with Caplock (e.g. http://vim.wikia.com/wiki/Map_caps_lock_to_escape_in_Windows ). |
One guy did a fantastic job remapping the caps-lock key on Windows. https://github.com/mjvh80/SymWin SymWin has no relation to VSCode by any means, but I just wanted to show that you don't have to edit Registry values. I use SymWin to write German umlauts on my US English keyboard because the German layout is pretty much sh*t for programming tasks. |
I believe this is outside of our control, except perhaps if we write a C++ module that does some magic. At our level we call |
I see that it is possible to contribute a keybinding and that we could also use |
@alexdima Do you have a clue if it is possible to toggle capslock (back) from within an extension and/or get the capslock state? If this would be the case an extension could handle that. |
@GitMensch The initial problem remains. We don't have a way to prevent a CapsLock press from triggering CapsLock. I think this might be doable with C++, by sending fake events to the OS to toggle CapsLock back or something like that. But that is outside of the scope of VS Code, we try to interpret what was pressed and it is not in our scope to implement key code swapping (esc <-> capslock). I think an OS level solution needs to be found for swapping escape and capslock. Maybe there is software that you can install and would swap this for you. |
incase anyone is looking for the OS level solution: |
If anyone is looking for yet another solution. Using PowerToys on their Keyboard Manager, you can remap CapsLock to Esc. It is also helpful if you want to turn off any shortcut. |
Steps to Reproduce:
{"key": "capslock", "command": "workbench.action.showCommands"}
Expected
Capslock should not be passed through and toggle caps-lock in the editor if it is mapped to a command. (Capslock is often mapped to exiting Insert mode in Vim setups, as it's far closer than the Escape key).
See also related VSCodeVim/Vim#854 .
The text was updated successfully, but these errors were encountered: