AutoHotkey Community

It is currently May 26th, 2012, 3:53 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Pass Through Keystrokes
PostPosted: April 9th, 2009, 4:19 pm 
Offline

Joined: October 30th, 2007, 1:40 pm
Posts: 20
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 9th, 2009, 4:37 pm 
Offline
User avatar

Joined: March 19th, 2008, 12:43 am
Posts: 5478
Location: the tunnel(?=light)
This possibly?

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

_________________
Image
Try Quick Search for Autohotkey or see the tutorial for newbies.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 9th, 2009, 4:51 pm 
Offline

Joined: October 30th, 2007, 1:40 pm
Posts: 20
Thanks. :D

The first method works.
The second gives an error message about an illegal expression when loading the script.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 9th, 2009, 4:52 pm 
Offline
User avatar

Joined: March 19th, 2008, 12:43 am
Posts: 5478
Location: the tunnel(?=light)
My bad:

Code:
Send % "{" A_ThisHotkey "}"

_________________
Image
Try Quick Search for Autohotkey or see the tutorial for newbies.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: BrandonHotkey, Exabot [Bot], notsoobvious and 23 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group