Sensitive Hot Key

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
hasantr
Posts: 933
Joined: 05 Apr 2016, 14:18
Location: İstanbul

Sensitive Hot Key

16 Jul 2018, 06:39

When I press the 7 + 8 keys, I want to mark the "{" sign. But I do not want 7 keys to become unusable. If I do not use the ~ sign, the 7 key will not function.
Bacspace key is not a good solution at all.
Could you suggest a solution?

Code: Select all

	~7 & 8::
	send, {Backspace}
	SendRaw, {
When writing code, I aim to write these marks more easily than on numbers.
Image

Thanks.
Rohwedder
Posts: 7630
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Sensitive Hot Key

16 Jul 2018, 07:11

Hallo,
try:

Code: Select all

$7 Up::
If A_PriorKey = 7
	Send, 7
Return
7 & 8::SendRaw, {
hasantr
Posts: 933
Joined: 05 Apr 2016, 14:18
Location: İstanbul

Re: Sensitive Hot Key

16 Jul 2018, 08:07

Thank you. İt's working. But the 7 key is a lag. Could it be a more effective solution?
Rohwedder
Posts: 7630
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Sensitive Hot Key

16 Jul 2018, 08:28

Hallo,
Autohotkey must wait whether another key is pressed in addition to key 7.
hasantr
Posts: 933
Joined: 05 Apr 2016, 14:18
Location: İstanbul

Re: Sensitive Hot Key

17 Jul 2018, 08:23

Code: Select all

$F1 Up::
If A_PriorKey = F1
Send, {F1}

~F1 & -::
Send,{_}
How can I use this method with F1. Help menu opens.
Rohwedder
Posts: 7630
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Sensitive Hot Key

18 Jul 2018, 02:38

Hallo,
this method contains no tilde:

Code: Select all

$F1 Up::
If A_PriorKey = F1
Send, {F1}
Return
F1 & -::
Send,{_}
Return
Edit: forgot the two Return
Last edited by Rohwedder on 18 Jul 2018, 08:35, edited 1 time in total.
hasantr
Posts: 933
Joined: 05 Apr 2016, 14:18
Location: İstanbul

Re: Sensitive Hot Key

18 Jul 2018, 08:19

Rohwedder wrote:Hallo,
this method contains no tilde:

Code: Select all

$F1 Up::
If A_PriorKey = F1
Send, {F1}

F1 & -::
Send,{_}

Thank you so much. I've done a lot of experimentation, but I'm skipping it. :)

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: doodles333 and 349 guests