Order of pressing modifier keys affects the result

Get help with using AutoHotkey and its commands and hotkeys
victorv
Posts: 26
Joined: 31 Dec 2018, 09:13

Re: Order of pressing modifier keys affects the result

31 Jan 2019, 09:55

Nope, this also opens start menu.

Would you be available for Skype call for me to share my screen. Or for a TeamViewer session?
rommmcek
Posts: 701
Joined: 15 Aug 2014, 15:18

Re: Order of pressing modifier keys affects the result

01 Feb 2019, 14:17

I see you didn't loose interest!
victorv wrote: Would you be available for Skype call for me to share my screen. Or for a TeamViewer session?
I don't use these apps, but I could try to temporarily install one of them. That would require real time presence, but I could do it during the weekend (not this one).

I managed to replicate (better to say emulate) the behavior you described in OP, where you didn't report triggering of Start Menu. So to fix "Order of pressing" I used ~:

Code: Select all

LWin & Right::
	if ShiftState
		Send +{End}
	Else 
		Send {End}
	ShiftState:= ""
Return

LShift & LWin::
LWin & ~LShift::ShiftState:= GetKeyState("Shift")
victorv
Posts: 26
Joined: 31 Dec 2018, 09:13

Re: Order of pressing modifier keys affects the result

01 Feb 2019, 16:27

In the OP I might have missed other code. Here is the full version:

Code: Select all

LWin & Right::
;    ss := GetKeyState("Shift")
;    ToolTip %ss%
	if GetKeyState("Shift") = 1
		Send +{End}
	Else 
		Send {End}
Return


LWin up::return

LWin::return

LWin & Shift up::
return

Shift & LWin::
return

LWin & Shift::
return

If I press first Shift then Win then Right, the cursor moves to the end of line selecting the text.
But if I first press Win and then Shift then Right -- the text is not selected.
rommmcek
Posts: 701
Joined: 15 Aug 2014, 15:18

Re: Order of pressing modifier keys affects the result

01 Feb 2019, 16:41

O.k. I get it, but Start Menu was not triggered, or?
How does perform my last scriptlet? Does it trigger Start Menu?
Try it without tilde too! (It should behave identically as your script)
P.s.: All this only by using Right arrow along specified modifying key/s!
rommmcek
Posts: 701
Joined: 15 Aug 2014, 15:18

Re: Order of pressing modifier keys affects the result

01 Feb 2019, 17:06

Or you can use your own script with ~ (tilde) in front of both Shift-s! E.g.: ~Shift
victorv
Posts: 26
Joined: 31 Dec 2018, 09:13

Re: Order of pressing modifier keys affects the result

02 Feb 2019, 07:40

Code: Select all

LWin & Right::
	if ShiftState
		Send +{End}
	Else 
		Send {End}
	ShiftState:= ""
Return

LShift & LWin::
LWin & ~LShift::ShiftState:= GetKeyState("Shift")
This gives the same behavior.
If I press first Shift then Win then Right, the cursor moves to the end of line selecting the text.
But if I first press Win and then Shift then Right -- the text is selected too, but Start menu is opened sometimes; sometimes it's hidden immediately.
victorv
Posts: 26
Joined: 31 Dec 2018, 09:13

Re: Order of pressing modifier keys affects the result

02 Feb 2019, 07:45

Code: Select all

LWin & Right::
;    ss := GetKeyState("Shift")
;    ToolTip %ss%
	if GetKeyState("Shift") = 1
		Send +{End}
	Else 
		Send {End}
Return


LWin up::return

LWin::return

LWin & ~Shift up::
return

~Shift & LWin::
return

LWin & ~Shift::
return

This is almost the same behavior except that start menu is opened sometimes with a delay after all the keys were de-pressed.
rommmcek
Posts: 701
Joined: 15 Aug 2014, 15:18

Re: Order of pressing modifier keys affects the result

02 Feb 2019, 07:48

How strange! What about without tilde (both scripts)?
GEV
Posts: 791
Joined: 25 Feb 2014, 00:50

Re: Order of pressing modifier keys affects the result

02 Feb 2019, 08:08

Could you test the hotkeys with another keyboard?
Some keyboards can't handle particular combinations of three keys, which is known as "key jamming and ghosting".
https://en.wikipedia.org/wiki/Rollover_(key)
victorv
Posts: 26
Joined: 31 Dec 2018, 09:13

Re: Order of pressing modifier keys affects the result

03 Feb 2019, 14:28

GEV wrote:
02 Feb 2019, 08:08
Could you test the hotkeys with another keyboard?
Some keyboards can't handle particular combinations of three keys, which is known as "key jamming and ghosting".
https://en.wikipedia.org/wiki/Rollover_(key)
The behavior is the same on the native keyboard (Dell XPS 9370) and with wireless keyboard HP Elite V2.
victorv
Posts: 26
Joined: 31 Dec 2018, 09:13

Re: Order of pressing modifier keys affects the result

03 Feb 2019, 14:29

rommmcek wrote:
02 Feb 2019, 07:48
How strange! What about without tilde (both scripts)?
I didn't understand where to put tilde.
rommmcek
Posts: 701
Joined: 15 Aug 2014, 15:18

Re: Order of pressing modifier keys affects the result

03 Feb 2019, 14:59

You've put the tilde correctly!
I just want to know, if your original script ever triggered Start Menu?
The same question for my latest scriptlet without tilde.

Return to “Ask For Help”

Who is online

Users browsing this forum: A_Perry_1984, bobkater, flyingDman, Google [Bot], Gully, nacken012, Trymado and 76 guests