Problem with window menu activating

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
nimmr
Posts: 2
Joined: 10 Feb 2018, 03:33

Problem with window menu activating

10 Feb 2018, 03:49

Hi

I have a problem with a AHK script I use to rebind keys from my danish keyboard layout. The Keys, æ, ø, å, are useless for me in IDE's and shells, so I've rebinded them to something I can use in those programs, namely [], {} and /.

My script looks like this:

#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
SetTitleMatchMode 2

; partial titles
GroupAdd, DevGroup, ahk_exe pycharm64.exe
GroupAdd, DevGroup, ahk_exe phpstorm64.exe
; exact classes by win spy
GroupAdd, DevGroup, ahk_class mintty

#IfWinActive ahk_group DevGroup
æ::Send {[}
ø::Send {]}
Æ::Send {{}}
Ø::Send {}}
å::Send {/}
CapsLock::Send {End}{;}
#IfWinActive
return

; End of script

So, my problem is a bit wierd. All rebindings work just fine in mintty and PyCharms, but these rebindings dosn't work in PhpStorm:

Æ to {
Ø to }

Or rather, they work, but they insert the { or }, and then it continues to set focus on the current window's context menu (if you left/right click on the window borders top left menu icon so a menu with restore/move/size/... appears). The menu dosn't show right away, but if I press the down-arrow, it appears and has restore selected.
The wierd part is that PhpStorm is built on the same JetBrains core as PyCharms, which dosn't have this issue.

I'm running Windows 10 and I've had the problem on all (including latest as of now) version and PhpStorm. I've even tried reinstalling and clearing all settings for PhpStorm, which didn't help
lexikos
Posts: 9583
Joined: 30 Sep 2013, 04:07
Contact:

Re: Problem with window menu activating

11 Feb 2018, 00:40

On the Danish layout, do you type {} with AltGr+7 and AltGr+0? I suppose that (AltGr) would be the link between your hotkey and the menu activating. AltGr should normally never activate a standard window menu since it is really a combination of LCtrl+RAlt, but maybe this isn't a standard window menu.

By default, characters are sent by converting them to the corresponding key combination. It will probably help to use {Text} mode (requires v1.1.27+) or {U+nnnn} instead.
nimmr
Posts: 2
Joined: 10 Feb 2018, 03:33

Re: Problem with window menu activating

11 Feb 2018, 02:29

Yes we use AltGr+7/0 to type the chars.

Thanks! Switching to U+nnnn seemed to have worked :)

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Descolada and 234 guests