๐Ÿ“œAesthetic Font Keyboard Hook in AHK

December 18, 2024  

This is an easy way to write with unicode fonts on Windows. There’s better solutions, but this works for me.

๐ŸŽจ Documentation:

img_2024-12-18-aesthetic-font-keyboard-hook-in-ahk_0

๐Ÿ‘ฉ๐Ÿปโ€๐Ÿ’ป Code:

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn  ; Enable warnings to assist with detecting common errors.
#SingleInstance, force
; AutoHotkey script to toggle input conversion between different character maps

; Define character maps
; monospaceCharMap := {"0":"๐Ÿถ","1":"๐Ÿท","2":"๐Ÿธ","3":"๐Ÿน","4":"๐Ÿบ","5":"๐Ÿป","6":"๐Ÿผ","7":"๐Ÿฝ","8":"๐Ÿพ","9":"๐Ÿฟ","a":"๐šŠ","b":"๐š‹","c":"๐šŒ","d":"๐š","e":"๐šŽ","f":"๐š","g":"๐š","h":"๐š‘","i":"๐š’","j":"๐š“","k":"๐š”","l":"๐š•","m":"๐š–","n":"๐š—","o":"๐š˜","p":"๐š™","q":"๐šš","r":"๐š›","s":"๐šœ","t":"๐š","u":"๐šž","v":"๐šŸ","w":"๐š ","x":"๐šก","y":"๐šข","z":"๐šฃ","A":"๐™ฐ","B":"๐™ฑ","C":"๐™ฒ","D":"๐™ณ","E":"๐™ด","F":"๐™ต","G":"๐™ถ","H":"๐™ท","I":"๐™ธ","J":"๐™น","K":"๐™บ","L":"๐™ป","M":"๐™ผ","N":"๐™ฝ","O":"๐™พ","P":"๐™ฟ","Q":"๐š€","R":"๐š","S":"๐š‚","T":"๐šƒ","U":"๐š„","V":"๐š…","W":"๐š†","X":"๐š‡","Y":"๐šˆ","Z":"๐š‰"}
; boldItalicCharMap := {"0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","a":"๐™–","b":"๐™—","c":"๐™˜","d":"๐™™","e":"๐™š","f":"๐™›","g":"๐™œ","h":"๐™","i":"๐™ž","j":"๐™Ÿ","k":"๐™ ","l":"๐™ก","m":"๐™ข","n":"๐™ฃ","o":"๐™ค","p":"๐™ฅ","q":"๐™ฆ","r":"๐™ง","s":"๐™จ","t":"๐™ฉ","u":"๐™ช","v":"๐™ซ","w":"๐™ฌ","x":"๐™ญ","y":"๐™ฎ","z":"๐™ฏ","A":"๐˜ผ","B":"๐˜ฝ","C":"๐˜พ","D":"๐˜ฟ","E":"๐™€","F":"๐™","G":"๐™‚","H":"๐™ƒ","I":"๐™„","J":"๐™…","K":"๐™†","L":"๐™‡","M":"๐™ˆ","N":"๐™‰","O":"๐™Š","P":"๐™‹","Q":"๐™Œ","R":"๐™","S":"๐™Ž","T":"๐™","U":"๐™","V":"๐™‘","W":"๐™’","X":"๐™“","Y":"๐™”","Z":"๐™•"}
; boldCharMap := {"0":"๐ŸŽ","1":"๐Ÿ","2":"๐Ÿ","3":"๐Ÿ‘","4":"๐Ÿ’","5":"๐Ÿ“","6":"๐Ÿ”","7":"๐Ÿ•","8":"๐Ÿ–","9":"๐Ÿ—","a":"๐š","b":"๐›","c":"๐œ","d":"๐","e":"๐ž","f":"๐Ÿ","g":"๐ ","h":"๐ก","i":"๐ข","j":"๐ฃ","k":"๐ค","l":"๐ฅ","m":"๐ฆ","n":"๐ง","o":"๐จ","p":"๐ฉ","q":"๐ช","r":"๐ซ","s":"๐ฌ","t":"๐ญ","u":"๐ฎ","v":"๐ฏ","w":"๐ฐ","x":"๐ฑ","y":"๐ฒ","z":"๐ณ","A":"๐€","B":"๐","C":"๐‚","D":"๐ƒ","E":"๐„","F":"๐…","G":"๐†","H":"๐‡","I":"๐ˆ","J":"๐‰","K":"๐Š","L":"๐‹","M":"๐Œ","N":"๐","O":"๐Ž","P":"๐","Q":"๐","R":"๐‘","S":"๐’","T":"๐“","U":"๐”","V":"๐•","W":"๐–","X":"๐—","Y":"๐˜","Z":"๐™"}
; boldSansCharMap := {"0":"๐Ÿฌ","1":"๐Ÿญ","2":"๐Ÿฎ","3":"๐Ÿฏ","4":"๐Ÿฐ","5":"๐Ÿฑ","6":"๐Ÿฒ","7":"๐Ÿณ","8":"๐Ÿด","9":"๐Ÿต","a":"๐—ฎ","b":"๐—ฏ","c":"๐—ฐ","d":"๐—ฑ","e":"๐—ฒ","f":"๐—ณ","g":"๐—ด","h":"๐—ต","i":"๐—ถ","j":"๐—ท","k":"๐—ธ","l":"๐—น","m":"๐—บ","n":"๐—ป","o":"๐—ผ","p":"๐—ฝ","q":"๐—พ","r":"๐—ฟ","s":"๐˜€","t":"๐˜","u":"๐˜‚","v":"๐˜ƒ","w":"๐˜„","x":"๐˜…","y":"๐˜†","z":"๐˜‡","A":"๐—”","B":"๐—•","C":"๐—–","D":"๐——","E":"๐—˜","F":"๐—™","G":"๐—š","H":"๐—›","I":"๐—œ","J":"๐—","K":"๐—ž","L":"๐—Ÿ","M":"๐— ","N":"๐—ก","O":"๐—ข","P":"๐—ฃ","Q":"๐—ค","R":"๐—ฅ","S":"๐—ฆ","T":"๐—ง","U":"๐—จ","V":"๐—ฉ","W":"๐—ช","X":"๐—ซ","Y":"๐—ฌ","Z":"๐—ญ"}
; cursiveCharMap := {"0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","a":"๐“ช","b":"๐“ซ","c":"๐“ฌ","d":"๐“ญ","e":"๐“ฎ","f":"๐“ฏ","g":"๐“ฐ","h":"๐“ฑ","i":"๐“ฒ","j":"๐“ณ","k":"๐“ด","l":"๐“ต","m":"๐“ถ","n":"๐“ท","o":"๐“ธ","p":"๐“น","q":"๐“บ","r":"๐“ป","s":"๐“ผ","t":"๐“ฝ","u":"๐“พ","v":"๐“ฟ","w":"๐”€","x":"๐”","y":"๐”‚","z":"๐”ƒ","A":"๐“","B":"๐“‘","C":"๐“’","D":"๐““","E":"๐“”","F":"๐“•","G":"๐“–","H":"๐“—","I":"๐“˜","J":"๐“™","K":"๐“š","L":"๐“›","M":"๐“œ","N":"๐“","O":"๐“ž","P":"๐“Ÿ","Q":"๐“ ","R":"๐“ก","S":"๐“ข","T":"๐“ฃ","U":"๐“ค","V":"๐“ฅ","W":"๐“ฆ","X":"๐“ง","Y":"๐“จ","Z":"๐“ฉ"}
; doubleStruckCharMap := {"0":"๐Ÿ˜","1":"๐Ÿ™","2":"๐Ÿš","3":"๐Ÿ›","4":"๐Ÿœ","5":"๐Ÿ","6":"๐Ÿž","7":"๐ŸŸ","8":"๐Ÿ ","9":"๐Ÿก","a":"๐•’","b":"๐•“","c":"๐•”","d":"๐••","e":"๐•–","f":"๐•—","g":"๐•˜","h":"๐•™","i":"๐•š","j":"๐•›","k":"๐•œ","l":"๐•","m":"๐•ž","n":"๐•Ÿ","o":"๐• ","p":"๐•ก","q":"๐•ข","r":"๐•ฃ","s":"๐•ค","t":"๐•ฅ","u":"๐•ฆ","v":"๐•ง","w":"๐•จ","x":"๐•ฉ","y":"๐•ช","z":"๐•ซ","A":"๐”ธ","B":"๐”น","C":"โ„‚","D":"๐”ป","E":"๐”ผ","F":"๐”ฝ","G":"๐”พ","H":"โ„","I":"๐•€","J":"๐•","K":"๐•‚","L":"๐•ƒ","M":"๐•„","N":"โ„•","O":"๐•†","P":"โ„™","Q":"โ„š","R":"โ„","S":"๐•Š","T":"๐•‹","U":"๐•Œ","V":"๐•","W":"๐•Ž","X":"๐•","Y":"๐•","Z":"โ„ค"}
; medievalCharMap := {"0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","a":"๐–†","b":"๐–‡","c":"๐–ˆ","d":"๐–‰","e":"๐–Š","f":"๐–‹","g":"๐–Œ","h":"๐–","i":"๐–Ž","j":"๐–","k":"๐–","l":"๐–‘","m":"๐–’","n":"๐–“","o":"๐–”","p":"๐–•","q":"๐––","r":"๐–—","s":"๐–˜","t":"๐–™","u":"๐–š","v":"๐–›","w":"๐–œ","x":"๐–","y":"๐–ž","z":"๐–Ÿ","A":"๐•ฌ","B":"๐•ญ","C":"๐•ฎ","D":"๐•ฏ","E":"๐•ฐ","F":"๐•ฑ","G":"๐•ฒ","H":"๐•ณ","I":"๐•ด","J":"๐•ต","K":"๐•ถ","L":"๐•ท","M":"๐•ธ","N":"๐•น","O":"๐•บ","P":"๐•ป","Q":"๐•ผ","R":"๐•ฝ","S":"๐•พ","T":"๐•ฟ","U":"๐–€","V":"๐–","W":"๐–‚","X":"๐–ƒ","Y":"๐–„","Z":"๐–…"}
; italicCharMap := {"0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","a":"๐˜ข","b":"๐˜ฃ","c":"๐˜ค","d":"๐˜ฅ","e":"๐˜ฆ","f":"๐˜ง","g":"๐˜จ","h":"๐˜ฉ","i":"๐˜ช","j":"๐˜ซ","k":"๐˜ฌ","l":"๐˜ญ","m":"๐˜ฎ","n":"๐˜ฏ","o":"๐˜ฐ","p":"๐˜ฑ","q":"๐˜ฒ","r":"๐˜ณ","s":"๐˜ด","t":"๐˜ต","u":"๐˜ถ","v":"๐˜ท","w":"๐˜ธ","x":"๐˜น","y":"๐˜บ","z":"๐˜ป","A":"๐˜ˆ","B":"๐˜‰","C":"๐˜Š","D":"๐˜‹","E":"๐˜Œ","F":"๐˜","G":"๐˜Ž","H":"๐˜","I":"๐˜","J":"๐˜‘","K":"๐˜’","L":"๐˜“","M":"๐˜”","N":"๐˜•","O":"๐˜–","P":"๐˜—","Q":"๐˜˜","R":"๐˜™","S":"๐˜š","T":"๐˜›","U":"๐˜œ","V":"๐˜","W":"๐˜ž","X":"๐˜Ÿ","Y":"๐˜ ","Z":"๐˜ก"}

monospaceCharMap := { "lower" : {"0":"{U+1D7F6}","1":"{U+1D7F7}","2":"{U+1D7F8}","3":"{U+1D7F9}","4":"{U+1D7FA}","5":"{U+1D7FB}","6":"{U+1D7FC}","7":"{U+1D7FD}","8":"{U+1D7FE}","9":"{U+1D7FF}","a":"{U+1D68A}","b":"{U+1D68B}","c":"{U+1D68C}","d":"{U+1D68D}","e":"{U+1D68E}","f":"{U+1D68F}","g":"{U+1D690}","h":"{U+1D691}","i":"{U+1D692}","j":"{U+1D693}","k":"{U+1D694}","l":"{U+1D695}","m":"{U+1D696}","n":"{U+1D697}","o":"{U+1D698}","p":"{U+1D699}","q":"{U+1D69A}","r":"{U+1D69B}","s":"{U+1D69C}","t":"{U+1D69D}","u":"{U+1D69E}","v":"{U+1D69F}","w":"{U+1D6A0}","x":"{U+1D6A1}","y":"{U+1D6A2}","z":"{U+1D6A3}"}, "upper" : {"A":"{U+1D670}","B":"{U+1D671}","C":"{U+1D672}","D":"{U+1D673}","E":"{U+1D674}","F":"{U+1D675}","G":"{U+1D676}","H":"{U+1D677}","I":"{U+1D678}","J":"{U+1D679}","K":"{U+1D67A}","L":"{U+1D67B}","M":"{U+1D67C}","N":"{U+1D67D}","O":"{U+1D67E}","P":"{U+1D67F}","Q":"{U+1D680}","R":"{U+1D681}","S":"{U+1D682}","T":"{U+1D683}","U":"{U+1D684}","V":"{U+1D685}","W":"{U+1D686}","X":"{U+1D687}","Y":"{U+1D688}","Z":"{U+1D689}"}}
boldItalicCharMap := { "lower" : {"0":"{U+0030}","1":"{U+0031}","2":"{U+0032}","3":"{U+0033}","4":"{U+0034}","5":"{U+0035}","6":"{U+0036}","7":"{U+0037}","8":"{U+0038}","9":"{U+0039}","a":"{U+1D656}","b":"{U+1D657}","c":"{U+1D658}","d":"{U+1D659}","e":"{U+1D65A}","f":"{U+1D65B}","g":"{U+1D65C}","h":"{U+1D65D}","i":"{U+1D65E}","j":"{U+1D65F}","k":"{U+1D660}","l":"{U+1D661}","m":"{U+1D662}","n":"{U+1D663}","o":"{U+1D664}","p":"{U+1D665}","q":"{U+1D666}","r":"{U+1D667}","s":"{U+1D668}","t":"{U+1D669}","u":"{U+1D66A}","v":"{U+1D66B}","w":"{U+1D66C}","x":"{U+1D66D}","y":"{U+1D66E}","z":"{U+1D66F}"}, "upper" : {"A":"{U+1D63C}","B":"{U+1D63D}","C":"{U+1D63E}","D":"{U+1D63F}","E":"{U+1D640}","F":"{U+1D641}","G":"{U+1D642}","H":"{U+1D643}","I":"{U+1D644}","J":"{U+1D645}","K":"{U+1D646}","L":"{U+1D647}","M":"{U+1D648}","N":"{U+1D649}","O":"{U+1D64A}","P":"{U+1D64B}","Q":"{U+1D64C}","R":"{U+1D64D}","S":"{U+1D64E}","T":"{U+1D64F}","U":"{U+1D650}","V":"{U+1D651}","W":"{U+1D652}","X":"{U+1D653}","Y":"{U+1D654}","Z":"{U+1D655}"}}
boldCharMap := { "lower" : {"0":"{U+1D7CE}","1":"{U+1D7CF}","2":"{U+1D7D0}","3":"{U+1D7D1}","4":"{U+1D7D2}","5":"{U+1D7D3}","6":"{U+1D7D4}","7":"{U+1D7D5}","8":"{U+1D7D6}","9":"{U+1D7D7}","a":"{U+1D41A}","b":"{U+1D41B}","c":"{U+1D41C}","d":"{U+1D41D}","e":"{U+1D41E}","f":"{U+1D41F}","g":"{U+1D420}","h":"{U+1D421}","i":"{U+1D422}","j":"{U+1D423}","k":"{U+1D424}","l":"{U+1D425}","m":"{U+1D426}","n":"{U+1D427}","o":"{U+1D428}","p":"{U+1D429}","q":"{U+1D42A}","r":"{U+1D42B}","s":"{U+1D42C}","t":"{U+1D42D}","u":"{U+1D42E}","v":"{U+1D42F}","w":"{U+1D430}","x":"{U+1D431}","y":"{U+1D432}","z":"{U+1D433}"}, "upper" : {"A":"{U+1D400}","B":"{U+1D401}","C":"{U+1D402}","D":"{U+1D403}","E":"{U+1D404}","F":"{U+1D405}","G":"{U+1D406}","H":"{U+1D407}","I":"{U+1D408}","J":"{U+1D409}","K":"{U+1D40A}","L":"{U+1D40B}","M":"{U+1D40C}","N":"{U+1D40D}","O":"{U+1D40E}","P":"{U+1D40F}","Q":"{U+1D410}","R":"{U+1D411}","S":"{U+1D412}","T":"{U+1D413}","U":"{U+1D414}","V":"{U+1D415}","W":"{U+1D416}","X":"{U+1D417}","Y":"{U+1D418}","Z":"{U+1D419}"}}
boldSansCharMap := { "lower" : {"0":"{U+1D7EC}","1":"{U+1D7ED}","2":"{U+1D7EE}","3":"{U+1D7EF}","4":"{U+1D7F0}","5":"{U+1D7F1}","6":"{U+1D7F2}","7":"{U+1D7F3}","8":"{U+1D7F4}","9":"{U+1D7F5}","a":"{U+1D5EE}","b":"{U+1D5EF}","c":"{U+1D5F0}","d":"{U+1D5F1}","e":"{U+1D5F2}","f":"{U+1D5F3}","g":"{U+1D5F4}","h":"{U+1D5F5}","i":"{U+1D5F6}","j":"{U+1D5F7}","k":"{U+1D5F8}","l":"{U+1D5F9}","m":"{U+1D5FA}","n":"{U+1D5FB}","o":"{U+1D5FC}","p":"{U+1D5FD}","q":"{U+1D5FE}","r":"{U+1D5FF}","s":"{U+1D600}","t":"{U+1D601}","u":"{U+1D602}","v":"{U+1D603}","w":"{U+1D604}","x":"{U+1D605}","y":"{U+1D606}","z":"{U+1D607}"}, "upper" : {"A":"{U+1D5D4}","B":"{U+1D5D5}","C":"{U+1D5D6}","D":"{U+1D5D7}","E":"{U+1D5D8}","F":"{U+1D5D9}","G":"{U+1D5DA}","H":"{U+1D5DB}","I":"{U+1D5DC}","J":"{U+1D5DD}","K":"{U+1D5DE}","L":"{U+1D5DF}","M":"{U+1D5E0}","N":"{U+1D5E1}","O":"{U+1D5E2}","P":"{U+1D5E3}","Q":"{U+1D5E4}","R":"{U+1D5E5}","S":"{U+1D5E6}","T":"{U+1D5E7}","U":"{U+1D5E8}","V":"{U+1D5E9}","W":"{U+1D5EA}","X":"{U+1D5EB}","Y":"{U+1D5EC}","Z":"{U+1D5ED}"}}
cursiveCharMap := { "lower" : {"0":"{U+0030}","1":"{U+0031}","2":"{U+0032}","3":"{U+0033}","4":"{U+0034}","5":"{U+0035}","6":"{U+0036}","7":"{U+0037}","8":"{U+0038}","9":"{U+0039}","a":"{U+1D4EA}","b":"{U+1D4EB}","c":"{U+1D4EC}","d":"{U+1D4ED}","e":"{U+1D4EE}","f":"{U+1D4EF}","g":"{U+1D4F0}","h":"{U+1D4F1}","i":"{U+1D4F2}","j":"{U+1D4F3}","k":"{U+1D4F4}","l":"{U+1D4F5}","m":"{U+1D4F6}","n":"{U+1D4F7}","o":"{U+1D4F8}","p":"{U+1D4F9}","q":"{U+1D4FA}","r":"{U+1D4FB}","s":"{U+1D4FC}","t":"{U+1D4FD}","u":"{U+1D4FE}","v":"{U+1D4FF}","w":"{U+1D500}","x":"{U+1D501}","y":"{U+1D502}","z":"{U+1D503}"}, "upper" : {"A":"{U+1D4D0}","B":"{U+1D4D1}","C":"{U+1D4D2}","D":"{U+1D4D3}","E":"{U+1D4D4}","F":"{U+1D4D5}","G":"{U+1D4D6}","H":"{U+1D4D7}","I":"{U+1D4D8}","J":"{U+1D4D9}","K":"{U+1D4DA}","L":"{U+1D4DB}","M":"{U+1D4DC}","N":"{U+1D4DD}","O":"{U+1D4DE}","P":"{U+1D4DF}","Q":"{U+1D4E0}","R":"{U+1D4E1}","S":"{U+1D4E2}","T":"{U+1D4E3}","U":"{U+1D4E4}","V":"{U+1D4E5}","W":"{U+1D4E6}","X":"{U+1D4E7}","Y":"{U+1D4E8}","Z":"{U+1D4E9}"}}
doubleStruckCharMap := { "lower" : {"0":"{U+1D7D8}","1":"{U+1D7D9}","2":"{U+1D7DA}","3":"{U+1D7DB}","4":"{U+1D7DC}","5":"{U+1D7DD}","6":"{U+1D7DE}","7":"{U+1D7DF}","8":"{U+1D7E0}","9":"{U+1D7E1}","a":"{U+1D552}","b":"{U+1D553}","c":"{U+1D554}","d":"{U+1D555}","e":"{U+1D556}","f":"{U+1D557}","g":"{U+1D558}","h":"{U+1D559}","i":"{U+1D55A}","j":"{U+1D55B}","k":"{U+1D55C}","l":"{U+1D55D}","m":"{U+1D55E}","n":"{U+1D55F}","o":"{U+1D560}","p":"{U+1D561}","q":"{U+1D562}","r":"{U+1D563}","s":"{U+1D564}","t":"{U+1D565}","u":"{U+1D566}","v":"{U+1D567}","w":"{U+1D568}","x":"{U+1D569}","y":"{U+1D56A}","z":"{U+1D56B}"}, "upper" : {"A":"{U+1D538}","B":"{U+1D539}","C":"{U+2102}","D":"{U+1D53B}","E":"{U+1D53C}","F":"{U+1D53D}","G":"{U+1D53E}","H":"{U+210D}","I":"{U+1D540}","J":"{U+1D541}","K":"{U+1D542}","L":"{U+1D543}","M":"{U+1D544}","N":"{U+2115}","O":"{U+1D546}","P":"{U+2119}","Q":"{U+211A}","R":"{U+211D}","S":"{U+1D54A}","T":"{U+1D54B}","U":"{U+1D54C}","V":"{U+1D54D}","W":"{U+1D54E}","X":"{U+1D54F}","Y":"{U+1D550}","Z":"{U+2124}"}}
medievalCharMap := { "lower" : {"0":"{U+0030}","1":"{U+0031}","2":"{U+0032}","3":"{U+0033}","4":"{U+0034}","5":"{U+0035}","6":"{U+0036}","7":"{U+0037}","8":"{U+0038}","9":"{U+0039}","a":"{U+1D586}","b":"{U+1D587}","c":"{U+1D588}","d":"{U+1D589}","e":"{U+1D58A}","f":"{U+1D58B}","g":"{U+1D58C}","h":"{U+1D58D}","i":"{U+1D58E}","j":"{U+1D58F}","k":"{U+1D590}","l":"{U+1D591}","m":"{U+1D592}","n":"{U+1D593}","o":"{U+1D594}","p":"{U+1D595}","q":"{U+1D596}","r":"{U+1D597}","s":"{U+1D598}","t":"{U+1D599}","u":"{U+1D59A}","v":"{U+1D59B}","w":"{U+1D59C}","x":"{U+1D59D}","y":"{U+1D59E}","z":"{U+1D59F}"}, "upper" : {"A":"{U+1D56C}","B":"{U+1D56D}","C":"{U+1D56E}","D":"{U+1D56F}","E":"{U+1D570}","F":"{U+1D571}","G":"{U+1D572}","H":"{U+1D573}","I":"{U+1D574}","J":"{U+1D575}","K":"{U+1D576}","L":"{U+1D577}","M":"{U+1D578}","N":"{U+1D579}","O":"{U+1D57A}","P":"{U+1D57B}","Q":"{U+1D57C}","R":"{U+1D57D}","S":"{U+1D57E}","T":"{U+1D57F}","U":"{U+1D580}","V":"{U+1D581}","W":"{U+1D582}","X":"{U+1D583}","Y":"{U+1D584}","Z":"{U+1D585}"}}
italicCharMap := { "lower" : {"0":"{U+0030}","1":"{U+0031}","2":"{U+0032}","3":"{U+0033}","4":"{U+0034}","5":"{U+0035}","6":"{U+0036}","7":"{U+0037}","8":"{U+0038}","9":"{U+0039}","a":"{U+1D622}","b":"{U+1D623}","c":"{U+1D624}","d":"{U+1D625}","e":"{U+1D626}","f":"{U+1D627}","g":"{U+1D628}","h":"{U+1D629}","i":"{U+1D62A}","j":"{U+1D62B}","k":"{U+1D62C}","l":"{U+1D62D}","m":"{U+1D62E}","n":"{U+1D62F}","o":"{U+1D630}","p":"{U+1D631}","q":"{U+1D632}","r":"{U+1D633}","s":"{U+1D634}","t":"{U+1D635}","u":"{U+1D636}","v":"{U+1D637}","w":"{U+1D638}","x":"{U+1D639}","y":"{U+1D63A}","z":"{U+1D63B}"}, "upper" : {"A":"{U+1D608}","B":"{U+1D609}","C":"{U+1D60A}","D":"{U+1D60B}","E":"{U+1D60C}","F":"{U+1D60D}","G":"{U+1D60E}","H":"{U+1D60F}","I":"{U+1D610}","J":"{U+1D611}","K":"{U+1D612}","L":"{U+1D613}","M":"{U+1D614}","N":"{U+1D615}","O":"{U+1D616}","P":"{U+1D617}","Q":"{U+1D618}","R":"{U+1D619}","S":"{U+1D61A}","T":"{U+1D61B}","U":"{U+1D61C}","V":"{U+1D61D}","W":"{U+1D61E}","X":"{U+1D61F}","Y":"{U+1D620}","Z":"{U+1D621}"}}

; Initialize variables
currentCharMap := monospaceCharMap
isEnabled := false

; Toggle script on/off with F1
#F1::ToggleEnabled()
ToggleEnabled() {
    global isEnabled
    isEnabled := !isEnabled
    ShowMessage(isEnabled ? "Input conversion enabled" : "Input conversion disabled")
}

ShowMessage(message) {
    Gui, Destroy  ; Clear any existing GUI
    Gui, +AlwaysOnTop -Caption +ToolWindow
    Gui, Font, s10 Bold, Segoe UI
    Gui, Add, Text, Center,  %message%
    Gui, Show, xCenter y10
    SetTimer, HideMessage, 1000
}

HideMessage:
    Gui, Destroy
    SetTimer, HideMessage, Off
Return

; Hotkey to show GUI
#F2::ShowCharMapGUI()

; Function to display GUI for switching character maps
ShowCharMapGUI() {
    global currentCharMap
    ; Create the GUI
    Gui, New, +AlwaysOnTop +Resize, Select Character Map
    Gui, Add, Text,, Select a character map:
    Gui, Add, DropDownList, vCharMapChoice w300, Monospace|Bold Italic|Bold|Bold Sans|Cursive|Double Struck|Medieval|Italic
    Gui, Add, Button, Default gApplyCharMap, Apply
    Gui, Add, Button, gCloseCharMapGUI, Cancel
    Gui, Show,, Character Map Selector
}

ApplyCharMap:
    Gui, Submit
    global currentCharMap, monospaceCharMap, boldItalicCharMap, boldCharMap, boldSansCharMap, cursiveCharMap, doubleStruckCharMap, medievalCharMap, italicCharMap

    ; Match the selected map
    if (CharMapChoice = "Monospace") {
        currentCharMap := monospaceCharMap
        ToolTip, Switched to monospace character map
    } else if (CharMapChoice = "Bold Italic") {
        currentCharMap := boldItalicCharMap
        ToolTip, Switched to bold italic character map
    } else if (CharMapChoice = "Bold") {
        currentCharMap := boldCharMap
        ToolTip, Switched to bold character map
    } else if (CharMapChoice = "Bold Sans") {
        currentCharMap := boldSansCharMap
        ToolTip, Switched to bold sans character map
    } else if (CharMapChoice = "Cursive") {
        currentCharMap := cursiveCharMap
        ToolTip, Switched to cursive character map
    } else if (CharMapChoice = "Double Struck") {
        currentCharMap := doubleStruckCharMap
        ToolTip, Switched to double struck character map
    } else if (CharMapChoice = "Medieval") {
        currentCharMap := medievalCharMap
        ToolTip, Switched to medieval character map
    } else if (CharMapChoice = "Italic") {
        currentCharMap := italicCharMap
        ToolTip, Switched to italic character map
    }

    Sleep, 1000
    ToolTip
    Gui, Destroy
Return

; Close the GUI without applying
CloseCharMapGUI:
    Gui, Destroy
Return


; Function to convert character based on current map and case
ConvertChar(char) {
    global currentCharMap
    if (GetKeyState("Shift")) {  ; Check for uppercase
        return currentCharMap.upper.HasKey(char) ? currentCharMap.upper[char] : char
    } else {  ; Lowercase by default
        return currentCharMap.lower.HasKey(char) ? currentCharMap.lower[char] : char
    }
}

; Convert input characters
#If isEnabled
*a::SendInput, % ConvertChar("a")
*b::SendInput, % ConvertChar("b")
*c::SendInput, % ConvertChar("c")
*d::SendInput, % ConvertChar("d")
*e::SendInput, % ConvertChar("e")
*f::SendInput, % ConvertChar("f")
*g::SendInput, % ConvertChar("g")
*h::SendInput, % ConvertChar("h")
*i::SendInput, % ConvertChar("i")
*j::SendInput, % ConvertChar("j")
*k::SendInput, % ConvertChar("k")
*l::SendInput, % ConvertChar("l")
*m::SendInput, % ConvertChar("m")
*n::SendInput, % ConvertChar("n")
*o::SendInput, % ConvertChar("o")
*p::SendInput, % ConvertChar("p")
*q::SendInput, % ConvertChar("q")
*r::SendInput, % ConvertChar("r")
*s::SendInput, % ConvertChar("s")
*t::SendInput, % ConvertChar("t")
*u::SendInput, % ConvertChar("u")
*v::SendInput, % ConvertChar("v")
*w::SendInput, % ConvertChar("w")
*x::SendInput, % ConvertChar("x")
*y::SendInput, % ConvertChar("y")
*z::SendInput, % ConvertChar("z")
~0::SendInput, % ConvertChar("0")
~1::SendInput, % ConvertChar("1")
~2::SendInput, % ConvertChar("2")
~3::SendInput, % ConvertChar("3")
~4::SendInput, % ConvertChar("4")
~5::SendInput, % ConvertChar("5")
~6::SendInput, % ConvertChar("6")
~7::SendInput, % ConvertChar("7")
~8::SendInput, % ConvertChar("8")
~9::SendInput, % ConvertChar("9")
#If