Jimbot
Jimbot

Reputation: 716

Program that replace chars on the fly doesn't work in Visual Studio 2022

A long time ago, I write a little program with AutoHotkey to make it easy to type accented capital letters on my keyboard such as when you type CTRL+SHIFT+é the output is replaced by É on the Windows API level (via Hotkeys). It's start with Windows, and still works very well today in any Windows application, except that it doesn't in Visual Studio 2022. Someone can tell me why?

There is the AutoHotkey code :

#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

Upvotes: 0

Views: 72

Answers (1)

Jimbot
Jimbot

Reputation: 716

Since Visual Studio 2022, you need to start the AutoHotkey exe with administrator privileges.

Upvotes: 0

Related Questions