This quesiton is similar to What is preventing ctrl-alt-m from reaching IntelliJ on Windows 10
. However, ctrl + alt + <anyKey> does go through to the jetbrain IDE, pressing any key after that just results in unexpected behavior. In particular I found pressing enter after issuing ^!u::SendRaw, { mapping results in a small popup in the upperleft corner of the jetbrain IDE. Note that unexpected behavior of ctrl + alt + <anyKey> only happens in jetbrain IDEs, it works perfectly fine in any other application.
My AHK script:
LControl & RAlt:: AltGr := true ; assign the boolean value "true" to the variable 'AltGr''
LControl & RAlt Up:: AltGr := false
; The #If directive creates context-sensitive hotkeys and hotstrings
#If (AltGr) ; If this variable has the value "true"
; =========== AltGr should function as AltGr (a unique key)
+s::Send, "
j::SendRaw, [
k::SendRaw, ] ; These works perfectly fine in any jetbrain IDE :)
u::SendRaw, {
i::SendRaw, }
#If ; turn off context sensitivity
; (ctrl)+(alt) mappings
^!u::SendRaw, { ; <-- these mappings doesn't work in jetbrain IDEs!!
^!i::SendRaw, } ; A popup always opens after pressing enter after ..
^!j::SendRaw, [ ; ... issuing one of these mappings
^!k::SendRaw, ]
I found that the output of the ctrl + alt + <anyKey> mapping is what is causing the issue. For instance, if I were to do this instead ^!u::SendRaw a, it would work perfectly fine! So there is something about mapping ctrl + alt + <anyChar> to send <any char thta is a bracket or curly bracket> that is causing the issue.
UPDATE
I found a solution, but it's not a good one, I would actually rather not use my AHK mappings than use this solution:
https://boringreallife.com/autohotkey-send-fix-for-intellij/
It sucks because mappings are only triggered upon keyUp, meaning, you are not able to hold down the keymapping to generate a lot of those chars, and it also feels very slow (partly because of the explicity keyDelay) and chunky now that we are used to chars appearing on keypress.
So please, if anyone got any solution, please do share it!