1

In Windows 11 WSL Ubuntu 20.04, I am using the new WslG feature which allows native gtk apps to run smoothly on windows (and I compiled Emacs 29 with the --with-pgtk option when installing), but I am running into the Alt (Meta) key randomly being stuck.

This most often occurs in this case (Alt+Tab is the shortcut to switch windows in Windows 11):

  1. Launch Emacs
  2. While active application is Emacs, use Alt+Tab to switch to the browser application
  3. Use Alt+Tab once more to switch back to Emacs
  4. Meta key is stuck in Emacs. E.g. just pressing x registers as M-x in Emacs

I have been able to get around the problem by pressing both Alt keys together, which returns emacs to the "normal" state in some cases, sometimes I have to repeat it a few times though. Is there some way to have Emacs automatically press both Alt (Meta) keys whenever I switch to the Emacs frame? Or some other elegant solution?

herophant
  • 223
  • 1
  • 8

1 Answers1

1

This is a known issue in WSLg. See the opened issue here: https://github.com/microsoft/wslg/issues/162

JST
  • 26
  • 1