rbreaves / kinto

Mac-style shortcut keys for Linux & Windows.
http://kinto.sh
GNU General Public License v2.0
4.24k stars 212 forks source link

remap WIN+L to ALT+D (macOS address bar select behavior) #839

Open tconroy opened 7 months ago

tconroy commented 7 months ago

Describe the bug On Windows, pressing CMD+L will have Windows lock the machine.

Expected behavior I would expect it instead to match CMD+L behavior on macOS, which selects the address bar (i.e in Chrome). In windows, this functionality is ALT+D by default.

Install Type: Bare Metal Distro: Windows 11 Branch: master

RedBearAK commented 7 months ago

@tconroy

Google for a few hours and you should find that although there is a way to disable the Win+L shortcut, it is deeply embedded into Windows and must be disabled by editing the registry. Also, this will completely disable the ability to lock the machine. For some reason. 🤷🏽

There is a possible solution you may find where you can have Autohotkey literally edit the registry to disable the shortcut when it starts up and then re-enable it when it shuts down, but obviously that is a very risky thing to do.

So basically this is a limitation of Autohotkey (and probably any other keymapper) on Windows, due to Windows detecting that specific shortcut at a lower level. I also had a problem with Win+G until I disabled some Microsoft gaming center or something.

This will mainly impact Apple keyboards, since the Cmd key is literally the same key code as the Win/Super/Meta key on PC keyboards (different operating systems and desktop environments refer to the key differently, but they are all the same key code, AFAIK). The problem is that Windows intercepts that specific combo before the keymapper can do anything with it.

On PC keyboards where the physical Win key is next to physical Alt, this only causes a problem with the special character you would normally get with Option+L on a Mac, and the equivalent of Cmd+L would be physical Alt+L and works fine.

Sorry to be the bearer of mostly bad news. I use that shortcut a lot myself. It's annoying there isn't a better solution available.

Fortunately this isn't a problem in the Linux version, regardless of keyboard type.

tconroy commented 7 months ago

Thanks for the detailed reply @RedBearAK! Understandable, but unfortunate. I ended up going down that rabbit hole of disabling the WIN+L key with registry edits but unfortunately even then I can't seem to bind anything to that key combo (just results in a noop). So back to the drawing board for me. Typically I'd just give up on this but I'm locking myself out of my PC when attempting to go to a URL like twice every half hour and it's super annoying 😓 hopefully muscle memory will kick in soon!

Cheers.

RedBearAK commented 7 months ago

@tconroy

super annoying

Yep. If you're not on an Apple laptop, and you're just using an external Apple keyboard on a desktop PC, you do have the option of switching to a PC-style keyboard, but that's about it.

On a PC keyboard you'd use physical Alt+L for the same shortcut, and Windows won't care.