r/AutoHotkey • • Aug 18 '20

Need Help help creating hotkey

how do i map d and right alt to press at the same time when i click d. and how do i map a to press a and right shift at the same time.

0 Upvotes

2 comments sorted by

1

u/dln_3 Aug 18 '20

This should explain how to send keystrokes: https://www.autohotkey.com/docs/commands/Send.htm

For example, your first program of ‘D’ and ‘Alt’ would look like:

d::

send {RAlt down}

send {d down}

send {RAlt up}

send {d up}

esc::exitApp

0

u/kofflay Aug 18 '20

More optimized:

d::
	SendInput {RAlt down}{d down}{d up}{RAlt up}
	return

Even more optimized:

d::
	SendInput <!d ;"<!" means right Alt
	return

But if you need not to repeat, but to hold RAlt+d, it would be a little tricky :-)