^!5:: or ^+5:: not working, a:: or 5:: do!!

Report problems with documented functionality
Bassman
Posts: 51
Joined: 22 Dec 2016, 11:48

^!5:: or ^+5:: not working, a:: or 5:: do!!

30 Dec 2016, 03:42

Hi:)

Following lines are not working:

^+5::
Send {Alt}
Return

^!5::
Send {Alt}
Return

Any combination of ^, ! and + do not send {Alt}, but Send Hello does work with these combinations, only the {Alt} command will do not! {Ctrl} and {Shift} do not work either....

5::
Send {Alt}
Return

or

a::
Send {Alt}
Return

for example do send {Alt}

Means, the Alt is not send, if I use "shifted" commands.....

Why?? What is wrong?

Bassman.
Ohnitiel
Posts: 19
Joined: 29 Dec 2016, 09:18

Re: ^!5:: or ^+5:: not working, a:: or 5:: do!!

30 Dec 2016, 07:54

It probably is sending Alt, but since you're holding Ctrl, Shift or Alt, the system sees as if you were sending the combination of those keys instead.
User avatar
evilC
Posts: 4823
Joined: 27 Feb 2014, 12:30

Re: ^!5:: or ^+5:: not working, a:: or 5:: do!!

30 Dec 2016, 14:59

I did some experimentation earlier and it does not appear to be sending Alt.

@Ohnitiel - bear in mind that ^a:: Send !{b} will NOT send Ctrl+Alt+B, it will release Ctrl, Send Alt+B, then re-hold Ctrl
^a:: Send {Blind}!{b} would send Ctrl+Alt+B

So if things are consistent, his syntax should be good.
Ohnitiel
Posts: 19
Joined: 29 Dec 2016, 09:18

Re: ^!5:: or ^+5:: not working, a:: or 5:: do!!

30 Dec 2016, 15:45

Yeah i had forgotten... So long since I used it like that. It's probably a system thing. It blocks sending Alt through a Ctrl + key hotkey.
User avatar
Nextron
Posts: 1391
Joined: 01 Oct 2013, 08:23
Location: Netherlands OS: Win10 AHK: Unicode x32

Re: ^!5:: or ^+5:: not working, a:: or 5:: do!!

30 Dec 2016, 17:05

evilC wrote:I did some experimentation earlier and it does not appear to be sending Alt.

@Ohnitiel - bear in mind that ^a:: Send !{b} will NOT send Ctrl+Alt+B, it will release Ctrl, Send Alt+B, then re-hold Ctrl
^a:: Send {Blind}!{b} would send Ctrl+Alt+B
You made me curious but I'm getting different results. While releasing the modifiers key is intended behavior as you described, it's not happening for me when sending {Alt} (which the hotkey does send in my case) as if sending a modifier key has an implicit {Blind} associated with it. Because Control and Alt are still logically down, it just doesn't have any noticeable effect.

Code: Select all

• Sending {Alt}
A2  01D	 	d	0.51	LControl       	
A4  038	 	d	0.16	LAlt           	
35  006	 	d	0.19	5              	
A4  038	i	d	0.05	LAlt           	
A4  038	i	u	0.01	LAlt           	
A4  038	i	d	0.03	LAlt           	
35  006	 	u	0.00	5              	
A2  01D	 	u	0.17	LControl       	
A4  038	 	u	0.00	LAlt  
• Sending a
A2  01D	 	d	0.14	LControl       	
A4  038	 	d	0.14	LAlt           	
35  006	 	d	0.41	5              	
A4  038	i	u	0.00	LAlt           	
A2  01D	i	u	0.00	LControl       	
41  01E	i	d	0.01	a              	
41  01E	i	u	0.02	a              	
A4  038	i	d	0.03	LAlt           	
A2  01D	i	d	0.00	LControl       	
35  006	 	u	0.05	5              	
A4  038	 	u	0.50	LAlt           	
A2  01D	 	u	0.13	LControl
To confirm, manually releasing the modifiers as is expected to be done automatically, does trigger a noticeable effect: ^!5::Send {LCtrl up}{LAlt up}{LAlt}{LCtrl down}{LAlt down}
Bassman
Posts: 51
Joined: 22 Dec 2016, 11:48

Re: ^!5:: or ^+5:: not working, a:: or 5:: do!!

31 Dec 2016, 04:42

Hi:)

I'm a bit confused!

What I want AHK to do, is send {Alt} to open the menubar and then "m" for to open the menu "Modificate" with the Keystroke Ctrl+Alt+5 or any other key with Ctrl+Alt.......

Now what's the correct Syntax to get it work??

Again:

7::
Send {Alt}m{Enter}g{Tab}-3{Tab 7}-3{Tab 2}{Enter}
Enter

works perfectly but I would need Ctrl+Alt+(7,8,9,0) to send these commands...
The problem I think is, cause I hold down Ctrl+Alt+7 and I release first the 7 and then later Ctrl and Alt, but for AHK instead send Alt it would send Ctrl+7, Alt is still pressed.....

I've tried:

^!5::
Send {Blind}!{d}
Return

and it sends indeed Ctrl+Alt+d, opens my digicheck window in windows. Exactly how @evilC told!

^!5::
Send {Ctrl UP}{Blind}!{m}
Return

sends Alt+m, not what I want!

^!5::
Send {Ctrl UP}!{m}
Return

does send Alt+m too

^!5::
Send {Ctrl UP}!{Alt UP}{m}
Return

only sends m


^!5::
Send {Ctrl UP}!{Alt UP}{Alt}{m}
Return

does send Alt and then m but it does not stay in the menu

Can't find out:(

Thank you;)

Bassman.
User avatar
Nextron
Posts: 1391
Joined: 01 Oct 2013, 08:23
Location: Netherlands OS: Win10 AHK: Unicode x32

Re: ^!5:: or ^+5:: not working, a:: or 5:: do!!

31 Dec 2016, 10:36

Post your key history like I have.

What the other posters and I are saying is that the command is correct, but the result is not what's expected. So we're either all overlooking something or there's a bug (with a crude workaround in my previous post), but that would have to be confirmed by posting someone else's key history.
User avatar
Exaskryz
Posts: 2882
Joined: 17 Oct 2015, 20:28

Re: ^!5:: or ^+5:: not working, a:: or 5:: do!!

31 Dec 2016, 10:54

I am getting the same results as Nextron. If we are doing a Send {Alt} or Send {Ctrl}, the modifiers used to activate the hotkey are not artificially released. But they are if you do something like Send a{Ctrl}. I experimented a little bit with #MenuMaskKey to see if that made a difference; it did not, but it did show which key events were the MaskKey (vk07 as per example) and which were the Send command.
Bassman
Posts: 51
Joined: 22 Dec 2016, 11:48

Re: ^!5:: or ^+5:: not working, a:: or 5:: do!!

31 Dec 2016, 20:28

@Nextron @Exaskryz

The result must be as expected, but it's not!

I've tried a lot,......there must be a solution!!!!
Friends:) Please let me know that there is some!!!
I'm drunk, doesn't help overall:)

*gg* Bassman.


P.S. 'Sorry it was Sylvester
User avatar
Nextron
Posts: 1391
Joined: 01 Oct 2013, 08:23
Location: Netherlands OS: Win10 AHK: Unicode x32

Re: ^!5:: or ^+5:: not working, a:: or 5:: do!!

01 Jan 2017, 07:40

I would recommend my workaround with manually sending the modifier up event, the key and then the down events of the modifier keys because it doesn't account for the actual state of the modifier keys that you may have already released, causing keys to get stuck. You can check for that but that's just wasted effort, because Exaskryz makes two good points:
• AHK does logically release the modifier key if another key besides Alt is sent.
• {vk07} which is sort of a non-defined key is used to mask the physical input of Alt/Win.

Combining those does give an acceptable result: ^!5::Send {vk07}{LAlt}.
lexikos
Posts: 9621
Joined: 30 Sep 2013, 04:07
Contact:

Re: ^!5:: or ^+5:: not working, a:: or 5:: do!!

01 Jan 2017, 16:59

Exaskryz wrote:If we are doing a Send {Alt} or Send {Ctrl}, the modifiers used to activate the hotkey are not artificially released.
This is intentional.
keyboard_mouse.cpp wrote: // Update: If this key is itself a modifier, don't change the state of the other
// modifier keys just for it, since most of the time that is unnecessary and in
// some cases, the extra generated keystrokes would cause complications/side-effects.
Bassman
Posts: 51
Joined: 22 Dec 2016, 11:48

Re: ^!5:: or ^+5:: not working, a:: or 5:: do!!

02 Jan 2017, 02:31

@Nextron

^!5::Send {vk07}{LAlt}m

does not work, the Modify Menu blinks shortly, but does not open it.....

But thanks....

Bassman.
User avatar
Nextron
Posts: 1391
Joined: 01 Oct 2013, 08:23
Location: Netherlands OS: Win10 AHK: Unicode x32

Re: ^!5:: or ^+5:: not working, a:: or 5:: do!!

02 Jan 2017, 07:10

That's probably because although it now releases the modifiers, it also reapplies them; dismissing the menu. Change the timing by preceding the Send with KeyWait Alt.
Bassman
Posts: 51
Joined: 22 Dec 2016, 11:48

Re: ^!5:: or ^+5:: not working, a:: or 5:: do!!

03 Jan 2017, 05:00

@Nextron

>>Change the timing by preceding the Send with KeyWait Alt

WOW:) I was so fascinated see it working;)

That's the solution!!

For all others:

^!5::
KeyWait Alt
Send {vk07}{LAlt}m
Return

for opening the Menu beginning with "m". This works!!


Thank you very much, Nextron!!

Bassman.

Return to “Bug Reports”

Who is online

Users browsing this forum: tank and 14 guests