即时替换字符的程序在 Visual Studio 2022 中不起作用



很久以前,我用AutoHotkey编写了一个小程序,以便在我的键盘上轻松键入重音大写字母,例如当您键入CTRL+SHIFT+时,输出将在Windows API级别(通过热键)上替换为É。它从Windows开始,今天在任何Windows应用程序中都能很好地工作,除了在Visual Studio 2022中不能。有人能告诉我为什么吗?

有自动热键代码:

#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
;#Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
;**********************************************************
; Majuscule pour clavier romand (suisse fr)
;**********************************************************
; Principalement pour ajouter le : 
;
; Ç -> Ctrl+Shift+4
; — -> Ctrl+Shift+- (tiret cadratin)
;
; Mais aussi : 
;  
; É -> Ctrl+Shift+é
; À -> Ctrl+Shift+à
; È -> Ctrl+Shift+è
; Ê -> Ctrl+Shift+e
; Â -> Ctrl+Shift+a
; Ô -> Ctrl+Shift+o
;
;**********************************************************
^+é::
Send, É
Return
^+è::
Send, È
Return
^+à::
Send, À
Return
^+4::
Send, Ç
Return
^+e::
Send, Ê
Return
^+a::
Send, Â
Return
^+o::
Send, Ô
Return
^+-::
Send, —
Return
^+NumpadSub::
Send, —
Return

从Visual Studio 2022开始,您需要以管理员权限启动AutoHotkey exe。