Page 3 of 3

Re: Order of pressing modifier keys affects the result

Posted: 31 Jan 2019, 09:55
by victorv
Nope, this also opens start menu.

Would you be available for Skype call for me to share my screen. Or for a TeamViewer session?

Re: Order of pressing modifier keys affects the result

Posted: 01 Feb 2019, 14:17
by rommmcek
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")

Re: Order of pressing modifier keys affects the result

Posted: 01 Feb 2019, 16:27
by victorv
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.

Re: Order of pressing modifier keys affects the result

Posted: 01 Feb 2019, 16:41
by rommmcek
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!

Re: Order of pressing modifier keys affects the result

Posted: 01 Feb 2019, 17:06
by rommmcek
Or you can use your own script with ~ (tilde) in front of both Shift-s! E.g.: ~Shift

Re: Order of pressing modifier keys affects the result

Posted: 02 Feb 2019, 07:40
by victorv

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.

Re: Order of pressing modifier keys affects the result

Posted: 02 Feb 2019, 07:45
by victorv

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.

Re: Order of pressing modifier keys affects the result

Posted: 02 Feb 2019, 07:48
by rommmcek
How strange! What about without tilde (both scripts)?

Re: Order of pressing modifier keys affects the result

Posted: 02 Feb 2019, 08:08
by GEV
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)

Re: Order of pressing modifier keys affects the result

Posted: 03 Feb 2019, 14:28
by victorv
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.

Re: Order of pressing modifier keys affects the result

Posted: 03 Feb 2019, 14:29
by victorv
rommmcek wrote:
02 Feb 2019, 07:48
How strange! What about without tilde (both scripts)?
I didn't understand where to put tilde.

Re: Order of pressing modifier keys affects the result

Posted: 03 Feb 2019, 14:59
by rommmcek
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.