Skip to main content
added 17 characters in body
Source Link
herophant
  • 213
  • 1
  • 10

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?

In Windows 11, 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?

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?

edited tags
Source Link
Drew
  • 79.1k
  • 10
  • 123
  • 257

In Windows 11, 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? Thank you for any help.

In Windows 11, 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? Thank you for any help.

In Windows 11, 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?

Source Link
herophant
  • 213
  • 1
  • 10

Meta key getting stuck in Windows 11 WslG, how to release meta when switching to frame

In Windows 11, 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? Thank you for any help.