AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Pass Through Keystrokes

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Mountie



Joined: 30 Oct 2007
Posts: 20

PostPosted: Thu Apr 09, 2009 3:19 pm    Post subject: Pass Through Keystrokes Reply with quote

Is it possible to pass through keystrokes as they are received? I have the following excerpted script
Up::
Down::
Right::
<commands, …>
Send,%a_thishotkey%


What happens here is that the actual literal for the key that was pressed is sent to the window. For Example, pressing <Up> would result in the literal “Up” being sent.

Is it possible to send the keystroke pressed and not the keystrokes literal?
Pressing the <Up> key should move the cursor up. Likewise when the <Down> key is pressed the cursor should be moved down.

Thank you.
Back to top
View user's profile Send private message
sinkfaze



Joined: 18 Mar 2008
Posts: 5044
Location: the tunnel(?=light)

PostPosted: Thu Apr 09, 2009 3:37 pm    Post subject: Reply with quote

This possibly?

Code:
Send {%A_ThisHotkey%}
; or
Send % {" A_ThisHotkey "}

_________________
Try Quick Search for Autohotkey or see the tutorial for newbies.
Back to top
View user's profile Send private message Send e-mail
Mountie



Joined: 30 Oct 2007
Posts: 20

PostPosted: Thu Apr 09, 2009 3:51 pm    Post subject: Reply with quote

Thanks. Very Happy

The first method works.
The second gives an error message about an illegal expression when loading the script.
Back to top
View user's profile Send private message
sinkfaze



Joined: 18 Mar 2008
Posts: 5044
Location: the tunnel(?=light)

PostPosted: Thu Apr 09, 2009 3:52 pm    Post subject: Reply with quote

My bad:

Code:
Send % "{" A_ThisHotkey "}"

_________________
Try Quick Search for Autohotkey or see the tutorial for newbies.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group