1

My laptop is a Lenovo Yoga 910 with Windows 10. I'm trying to use AutoHotKey to make the following mapping:

PgUp::RShift
RShift::PgUp
End::PgDn
PgDn::Right

However, with the exception of the RShift::PgUp re-map, it simply refuses to acknowledge any of these mappings. I suspected this was because my mapping is causing keys to be "swapped" or overlapped. So I studied this example, and made another attempt:

$PgUp::Send {RShift}
$RShift::Send {PgUp}
$End::Send {PgDn}
$PgDn::Send {Right}

The above also did not work. What am I missing?

I am able to make other mappings work successfully. For example, the rest of the mappings in the same ahk script work just fine:

+BS::send {Delete}
$Del::End
Insert::Home
#v::
  Run, notepad.exe
Return

Any suggestions?

1 Answer 1

4

I think you are correct that it is overlapping the remaps, so it maps to one then proceeds and maps back to the first. You can resolve this by putting a return after each send command.

$PgUp::
    Send {RShift}
    Return
$RShift::
    Send {PgUp}
    Return
$End::
    Send {PgDn}
    Return
$PgDn::
    Send {Right}
    Return

This ends up causing the whole script to stop remapping after it hits the return until the next key is pressed.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .