How to manage character substitutions?

Well, I’m quite happy to report that I’ve got a very satisfactory solution!

The code below is for AHK (Windows). When I press F12, it gives me a soft beep and a little tool tip telling me substitution is turned on. I’ve mapped things like curly quotes, the copyright symbol, and dedicated small caps in the font I’m using (Minion Pro), all to simple keys. Then pressing F12 again turns it off.

Here’s a sample of the code, just the first of the caps. Obviously there are other ways to do it, and if you’re using a different font, the Unicode will be different for some of these.

Lots of possibilities here for simple keyboard extensions, even stretching into Dorico itself. I know I’m not the first one to do this, but it’s a great solution for my problem. Long live compact keyboards!

F12::
	Sub := !Sub
	SoundBeep, Sub ? 600 : 400
	ToolTip, % "Substitution " . (Sub ? "ON" : "OFF")
	SetTimer, ToolTipOff, -1000
return

ToolTipOff:
	ToolTip
return

#If Sub
c::Send, {U+00A9}
m::Send, {U+2014}
n::Send, {U+2013}
q::Send, {U+201C}
r::Send, {U+201D}
w::Send, {U+2018}
e::Send, {U+2019}
+a::Send, {U+F761}
1 Like