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

CapsLock -> Control remap stopped working inside Vim inside WSL inside Windows Terminal #5300

Closed
christianfosli opened this issue Jul 29, 2020 · 3 comments
Labels
Issue-Bug Something isn't working

Comments

@christianfosli
Copy link

christianfosli commented Jul 29, 2020

Disclaimer I realize this is a very specific issue, and I'm not 100% sure it is caused by a bug in PowerToys.
However, this was working perfectly about a week ago before I updated PowerToys to version 0.19.2,
so I suspect it stopped working because of some recent changes to PowerToys.

ℹ Computer information

  • Windows build number: Version 1909 (OS Build 18363.959)
  • PowerToys version: 0.19.2
  • PowerToy module: Keyboard Manager

📝 Provide detailed reproduction steps (if any)

  1. Remap key "Caps Lock" to "Ctrl" in PowerToys Keyboard Manager
  2. Open Windows Terminal (I use v1.1.2021.0)
  3. Open a WSL distro (I tested FedoraRemix F31 and Ubuntu 20.04)
  4. Open Vim or Neovim, go into insert mode
  5. Press "Caps Lock"

✔️ Expected result

"Caps Lock" should be treated as "Control". No visible result.

❌ Actual result

"Caps Lock" is treated as "Control-Space", and tries insert any previously inserted text again.

More relevant details

  • This happens only inside Windows-Subsystem for Linux (WSL1) inside windows terminal
  • I tested with a new installation of Ubuntu from the Microsoft Store, with no customizations to Ubuntu, Vim or wslconf
  • I tested inside and outside of tmux, which did not make any difference
  • The issue is not present running WSL from CMD or Powershell.
  • The issue is not present running Neovim from Windows Powershell inside windows terminal
  • The issue is not present running Linux (tested Alpine) inside windows terminal as a Docker container

It's a bit annoying, because I like to escape out of normal mode by pressing <CapsLock>-[ (which should be treated as <Ctrl>-[). Now I instead insert the text i wrote twice.

📷 Screenshots

Result from <Ctrl-v><Caps-Lock> in vim (Ctrl-v inserts the key pressed next as text)
image

@christianfosli christianfosli added the Issue-Bug Something isn't working label Jul 29, 2020
@ghost ghost added the Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams label Jul 29, 2020
@christianfosli
Copy link
Author

It could also be a bug in Windows Terminal 1.1
This issue looks a bit similar

Unfortunately I'm unable to check if it works in Windows Terminal 1.0 because their msix installer package is broken on my computer..

@christianfosli
Copy link
Author

Closing in favour of microsoft/terminal#7120
The issue went away by adding an expirmental falg to Windows Terminal's settings

@crutkas crutkas removed the Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams label Oct 16, 2020
@RT-Tap
Copy link

RT-Tap commented Dec 7, 2022

Not sure if you figured this out but for me it was because power toys was running as user rather than admin. Just go to Geneeral --> administrator mode

Credit: https://stackoverflow.com/questions/67593307/microsoft-powertoys-key-mapping-not-working-in-visual-studio

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants