Make two remappings separate

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
lluke
Posts: 43
Joined: 12 Feb 2018, 19:10

Make two remappings separate

19 Nov 2018, 14:11

In that code when `Tab & ;` is pressed shortcut is influenced with extra `;` character. How to make them working separatly? So there is no influence on each other.
1. `Tab & ;` gives `8`
2. `; up` gives `;`

Code: Select all

Tab & `;::
if GetKeyState("ctrl")
  Send ^{8}
else
  Send {8}
return

`; up::
  Send `;
return
Albireo
Posts: 1752
Joined: 16 Oct 2013, 13:53

Re: Make two remappings separate

20 Nov 2018, 07:03

I don't understand what you want to do.
But does this not work for you? (for example)

Code: Select all

`; up::
  if !GetKeyState("ctrl")
       Send `;
return
lluke
Posts: 43
Joined: 12 Feb 2018, 19:10

Re: Make two remappings separate

21 Nov 2018, 05:07

Albireo wrote:
20 Nov 2018, 07:03
I don't understand what you want to do.
But does this not work for you? (for example)

Code: Select all

`; up::
  if !GetKeyState("ctrl")
       Send `;
return
When I release sequence of Tab & `; I should get 8 ,but the result is 8; (with extra semicolon).
I don't need semicolon. I have several remappings using semicolon as modifier. so code:

Code: Select all

`; up::
  Send `;
return
is necessary to prevent pop up ; character. I use also Tab as modifier key for many remappings.
Unfortunatelly when both Tab and ; are used in the same remapping something goes wrong and ; pop up.
I want to correct this behaviour.
Albireo
Posts: 1752
Joined: 16 Oct 2013, 13:53

Re: Make two remappings separate

21 Nov 2018, 10:46

Have you tried ControlSend?

Code: Select all

Tab & `;::
if GetKeyState("ctrl")
  ControlSend  Edit1, ^{8}, ahk_exe ????.exe
else
  ControlSend  Edit1, {8}, ahk_exe ????.exe
Return

`; up::
  ControlSend  Edit1,  `;, ahk_exe ????.exe
Return
I don't know the name of your Control (I gave it the name Edit1)
And I don't know the name of your exe-file....

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Fredrik F, maxkill, RandomBoy, ShatterCoder and 404 guests