Help! Shift hotkey can't trigger Send {Shift Down} ?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
mesme
Posts: 2
Joined: 27 Jan 2018, 15:59

Help! Shift hotkey can't trigger Send {Shift Down} ?

27 Jan 2018, 17:16

Hi there!
My laptop's arrow keys had stooped working all together, so using AutoHotkeys I remaped Home, End and Pag keys as Arrows keys. Like this for example:

Code: Select all

Home::Left
Later, I recuperated the original Home function when I press it while holding the Win key. Like this:

Code: Select all

<#Home::
	Send, {Lwin Up}
	Send, {Home Down}
	Send, {Home Up}
	Return	
That works nicelly.

But what I'm trying to do now, is add support for when you do a Home action while holding Shift (This should move the cursor to the start of the line while selecting the text in between).
Tried this, but with no luck:

Code: Select all

+<#Home::
	Send, {Shift Down}
	Send, {Home	Down}
	Send, {Home	Up}
	Send, {Shift Up}
	Return
If I remove the '+' in the trigger or put another modifier, the last code works. But what I want is to trigger the last accion with Shift+WinKey+Home. It's crucial that the shift key is used.

Any clues on how to achieve this? Already tried miscellaneous combinations using ~ and $ but with no luck.

Thanks in advance, loving ATH so far. Almost glad that my keyboard broke and found this haha.
mesme
Posts: 2
Joined: 27 Jan 2018, 15:59

Re: Help! Shift hotkey can't trigger Send {Shift Down} ?

27 Jan 2018, 17:53

Found a solution:

Code: Select all

+<#Home::
	Send, +{Home}
	Return
Osprey
Posts: 453
Joined: 18 Nov 2017, 05:50

Re: Help! Shift hotkey can't trigger Send {Shift Down} ?

27 Jan 2018, 18:02

FYI, you could simply do +<#Home::Send, +{Home}. The Return isn't necessary when the hotkey is only one line.
GreatGazoo
Posts: 69
Joined: 28 Dec 2017, 02:53

Re: Help! Shift hotkey can't trigger Send {Shift Down} ?

27 Jan 2018, 18:03

my laptop has 2 home keys and both require the "Fn" key to be used, I'm not sure if this will work because i cant test it

but try to add the ~ in front

Code: Select all

~+<#Home::
	Send, {Shift, Down}
	Send, {Home, Down}
	Send, {Home, Up}
	Send, {Shift, Up}
	Return
Shift key. As a hotkey (Shift::) it fires upon release unless it has the tilde prefix. Corresponds to the + hotkey prefix.
https://autohotkey.com/docs/KeyList.htm

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: doodles333, exodus_cl, ratyrat, Sniperman and 363 guests