0

I have the follow autohotkey map:

    ^j:: Send ^{PgUp}

This works fine. It maps control + j to control+pagedown.

But I would like to map the keycombination

    s & j:: Send ^{PgUp}

So when you press s and j simultaneously, it will send control pagedown to Windows. Then i'm running into the problem that the character 's' never shows up in my input field, but the character 'j' is appearing as normal. That is weird. The combo key is working, by the way. But I want to get the character 's' key working too.

And are there ways to map the key combination sj (when the both are pressed simultaneously) ?

Alex Celeste
  • 12,824
  • 10
  • 46
  • 89
ReneFroger
  • 484
  • 8
  • 20
  • I'm giving away 100 mBTC (0.1 BTC) for the right answer, where I can make a combination of the letter 'S' with another letters. When your solution works, in respect for still working the letter 'S', you will receive 100 mBTC on your address! – ReneFroger Feb 10 '14 at 09:45

3 Answers3

1

~s & j:: Send ^{PgUp} return

was the winning answer by the way, got it from the user RCHP on Autohotkey forum :)

ReneFroger
  • 484
  • 8
  • 20
0

This is by design. The first key of a custom hotkey always loses it's original function. To work around this, create a new hotkey for "s" that sends "s".

Ian Campos
  • 168
  • 1
  • 9
  • Thank you in for your reply. It is disappointing to read that the original key will not work anymore when you make a combination with another keys. I still believe that this is possible somehow. But I'm not experienced enough in scriptiing. – ReneFroger Feb 10 '14 at 09:44
0

In AutoHotKey, hotkeys override their normal function, which is generally desirable. In order to avoid this behavior, prefix your hotkey with a tilde.

~s & j:: Send ^{PgUp} return

The terrific AHK docs explain this.

Dane
  • 1,201
  • 8
  • 17