Created
August 23, 2025 23:02
-
-
Save blueset/6c368aef3ee0501cdffd4fe67accc667 to your computer and use it in GitHub Desktop.
Option Symbols AHK
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; ![ ; alt + [ | |
; !+[ ; alt + shift + [ | |
*![::altShift("“","”") | |
*!]::altShift("‘","’") | |
*!-::altShift("–","—") | |
*!9::altShift("‘","“") | |
*!0::altShift("’","”") | |
altShift(accented,accentedShift) { | |
if (!GetKeyState("Shift")) { | |
SendInput(accented) | |
} else { | |
SendInput(accentedShift) | |
} | |
} | |
; by D.S, CC BY-SA 4.0 | |
; https://superuser.com/a/1848160/370703 | |
; Try to fix that above hotkey works even when the RDP Session has taken control of the keyboard | |
; Allow ctrl & alt combinations since one of the keys might still be in "Down" state when the VKFF key arrives. | |
GroupAdd "TSClientGroup", "ahk_class TscShellContainerClass" | |
#HotIf WinActive("ahk_group TSClientGroup") | |
~VKFF:: | |
~^VKFF:: | |
~!VKFF:: | |
~^!VKFF:: | |
{ | |
; An artificial vkFF keystroke is detected when the RDP client becomes active. | |
; At that point, the RDP client installs its own keyboard hook which takes | |
; precedence over ours, so ... | |
if (A_TimeIdlePhysical > A_TimeSinceThisHotkey) | |
{ | |
Suspend True | |
Suspend False ; ... reinstall our hook. | |
Sleep 50 | |
} | |
return | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment