rbreaves / kinto

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

[Win] Option key special character entry scheme #719

Closed RedBearAK closed 2 years ago

RedBearAK commented 2 years ago

This is an AHK implementation of the full selection of special characters, symbols, and dead keys accented characters that are available on the standard US Apple keyboard using Option or Option+Shift. Uses the AHK Unicode method, which works even with applications like Notepad that fail with the Alt Code character entry method.

The Option key scheme will interfere with Alt and Alt+Shift shortcuts while active, so it is disabled by default when the AHK script is loaded. It can be enabled and disabled again with Shift+Option+Command+O (the letter "o"), or by using the new tray menu item. The tray menu item will receive a check mark when the scheme is active.

Alert messages are presented to the user on enable and disable. The enable MsgBox warns about the conflict and reminds the user how to disable the scheme.

Known issues:

Option+g will work, but will bring up Windows XBox "Game Bar". This can be disabled in PowerShell:

Get-AppxPackage Microsoft.XboxGamingOverlay | Remove-AppxPackage

Typing Option+L will work, but will also lock the screen since the keys are Win+L. This can only be disabled in the registry, which will completely disable the ability to lock the screen. There's no known better solution. But it's very quick to log back in, so it's no big deal.

The Apple logo (Shift+Option+K) exists only in the Baskerville Old Face font, and the related shortcut will display a MsgBox explaining how to make it display properly.

All other characters work without known issues.

Documentation of all the included characters (137 different characters, if my math is right) that can be typed when this scheme is enabled is here:

https://github.com/RedBearAK/optspecialchars/blob/main/Option-key-characters_US.md

This PR replaces and enhances the Umlaut function submitted by user Kirschem in PR #647.

RedBearAK commented 2 years ago

@rbreaves

On the advice of someone in the AHK forums, I converted the if-else logic blocks for the "dead keys" to Switch/Case commands.

rbreaves commented 2 years ago

Really amazing work! I appreciate the PR, just got done testing it. Merging it now!

RedBearAK commented 2 years ago

@rbreaves

Really amazing work! I appreciate the PR, just got done testing it. Merging it now!

Thanks a lot! Will be trying to do the same thing on the Linux side, with the assistance of keyszer, since it needs nested keys and possibly a new function to enable/disable with a shortcut.