Just got new laptop -- Acer Swift Lite 14 running Windows Home 11. The machine comes with Copilot key in the place of right ctrl.
With suggestion on internet I can use MS PowerToys to remap the shortcut from Copilot key (which PowerToys detected as Win (Left) + Shift (Left) + F23) to Ctrl (Right)
The remapping works fine in any app except some cases in Emacs.
Simple case like C-a (move-beginning-of-line) works fine.
But when there is any following non Ctrl-sequence like C-x b, Emacs will report error like "C-x <lwindow> is undefined"
Looks like when I release the Copilot key (before press next key), for some reason, Emacs detects a <lwindow> key press. No idea why.
I have to add shortcut with <lwindow> like this to workaround this.
(global-set-key (kbd "C-x <lwindow> b") 'switch-to-buffer) Anybody, have better suggestion to properly fix this ?
Update
I use Lazarus to print out what keycode produced when Copilot is pressed after PowerToys shortcut mapping. Below is the result
<lwindow>key down<shift>key down"char 255"key down"char 255"key up<shift>key up<lwindow>key up<ctrl>key down<ctrl>key up<lwindow>key down"char 255"key down"char 255"key up<lwindow>key up
PowerToys did produce <lwindow> key sequence (1 - 6) before <ctrl> (7 - 8) And also after (9 - 12)
As far as I know Emacs has code in w32-win.el to ignore <lwindow>, because generally <lwindow> will make active Window switch to other and Emacs will never receive <lwindow> key up event. But this case it is not.
