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 

need the send, key

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
^ unbind
Guest





PostPosted: Sat Feb 26, 2005 3:42 pm    Post subject: need the send, key Reply with quote

hi, i got the following problem:

I need the ^ key. When Autokotkey is loaded i always need to hit the certain key twice until it responds. Any suggestions?

I really searchesd the help and the forum here but i don' have a clue what to search for.
Back to top
BoBo
Guest





PostPosted: Sat Feb 26, 2005 4:04 pm    Post subject: Reply with quote

AFAIK, AHK uses the ^ as an equivalent for the CTRL key:
Quote:
'^'
Sends a CONTROL keystroke, therefore Send, ^!a would send "CTRL+ALT+a".


Therefore you've to use this: {^} or its ASCII value
Code:
Send, {^}

Quote:
I really searchesd the help
Are you sure ? I've taken the above from AHK's help about its Send command. Wink
Well, I know its a li'll philosophical: you send a command from your braincell through your fingertip via a key to the CPU to process that command and respond via Stdout. Who the f... should know that its all about Send ? Laughing
Back to top
Guest






PostPosted: Sat Feb 26, 2005 4:18 pm    Post subject: Reply with quote

yes, i read that too but i dont see how it helps me.
I need the ^ Key because of its location near the 1 ( a Game Key to be more specific), so it is mapped as a Key in the Game. So when i use AHK now, it won't let the Key do what it normally does, until i hit it twice.
Back to top
jonny



Joined: 13 Nov 2004
Posts: 3004
Location: Minnesota

PostPosted: Sat Feb 26, 2005 5:38 pm    Post subject: Reply with quote

So you've already mapped it but you need some help with the specifics of the coding? I don't see how we can be expected to help with that, since you haven't given us the code. Smile
Back to top
View user's profile Send private message
Guest






PostPosted: Sat Feb 26, 2005 7:30 pm    Post subject: Reply with quote

sry for my poor explanation people, it's not my native language.

what i want to do AHK is, NOT to use the ^ in any way.

when AHK is loaded, it prevents the ^ key from doing it's regular job. Only if i hit it twice, it does what i configured in the game setup.
So there is no code to show, i would post it if i had some.
Back to top
jonny



Joined: 13 Nov 2004
Posts: 3004
Location: Minnesota

PostPosted: Sat Feb 26, 2005 8:09 pm    Post subject: Reply with quote

I see. Well, that's strange, and I'm not sure what causes it. However, I might be able to offer a solution: remap the key to itself in AHK. Use this method to discover the key's scancode:

Documentation wrote:
Special Keys

If your keyboard has a key not listed above, you might still be able to make it a hotkey by using the following steps (requires Windows XP/2000/NT or later):

1. Ensure that at least one script is running that has the keyboard hook installed.
2. Double-click that script's tray icon to open its main window.
3. Press one of the "mystery keys" on your keyboard.
4. Select the menu item "View->Key history"
5. Scroll down to the bottom of the page. Somewhere near the bottom of the history list are the key-down and key-up events for your key. NOTE: Some keys do not generate events and thus will not be visible here. If this is the case, you cannot make that particular key a hotkey because your keyboard driver or hardware handles it at a level too low for AutoHotkey to access. In that case, one option is to try reconfiguring or removing any extra software that came with your keyboard or changing the keyboard driver to a more standard one such as the one built into the OS.
6. If your key does generate events, make a note of the 3-digit value in the second column of the list (e.g. 159).
7. To define this key as a hotkey, follow this example:
SC159:: ; Replace 159 with your key's value.
MsgBox, %A_ThisHotKey% was pressed.
return

As an alternative or addition to the above: To remap some other key to become a "mystery key", follow this example (requires v1.0.14+): #c::Send {vkFFsc159} ; Replace 159 with the value discovered above. Replace FF (if needed) with the key's virtual key, which can be discovered in the first column of "View->Key history".


And then assign it to a pass-through hotkey. The tilde (~) designates a pass-trhough. For example, if the scancode was 159, it would look like this:

Code:
~SC159::
return


If that doesn't work, though, try using that hotkey with this Send syntax:

Quote:
{vkXX} or {vkXXscYYY}

Sends a keystroke that has virtual key XX and scan code YYY. If the scYYY portion is omitted, XX's default scan code will sent. The values for XX and YYY are hexadecimal and can sometimes be determined from the main window's "View->Key history" menu item. Requires v1.0.14+. Example: Send {vkFFsc159}


So you'd end up with a hotkey that looks something like this (the "$" and "*" are conventional when remapping a hotkey to itself):

Code:
$*SC159::
Send,{vkFFsc159}
return
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Sat Feb 26, 2005 8:13 pm    Post subject: Reply with quote

Anonymous wrote:
when AHK is loaded, it prevents the ^ key from doing it's regular job.
This is probably caused by the fact that: 1) Your script uses Hotstrings; and 2) Your system is set up to use multiple languages or keyboard layouts.

There is an item in the FAQ about multi-language systems. If it doesn't solve your problem, please let me know.
Back to top
View user's profile Send private message Send e-mail
db(A)



Joined: 26 Feb 2005
Posts: 2

PostPosted: Sat Feb 26, 2005 8:56 pm    Post subject: Reply with quote

thanks for your answers, i registered now.Ii think AHK will become my 2nd best friend in a while.Smile

here we go:
i followed the example and 029 is the value to use.
So i made it like this on the first attempt:
Code:

~SC029::
return

that didn't work Smile, still the same problem.
So i tried that:
Code:

#z::Run, www.autohotkey.com
$*SC029::
Send,{vkFFsc029}
return

that neither., now it doesn't anything at all:)

>Hah! i found the solution, i keep the way to get there so that others can read it, too.
The correct code is:
Code:

$*SC029::
Send,{vkDCsc029}
return

DC instead of FF is needed.

Quote:
This is probably caused by the fact that: 1) Your script uses Hotstrings; and 2) Your system is set up to use multiple languages or keyboard layouts.

uhmmm, i use german layout here, no additional language is specified, if it was, how do i disable that?

i got another question: i want AHK to press a Keystroke with delay, i tried that but somehow the delay doenst work:
Code:

SetKeydelay,20,10
Xbutton1::send,{4}{5}{6}{7}
Back to top
View user's profile Send private message
jonny



Joined: 13 Nov 2004
Posts: 3004
Location: Minnesota

PostPosted: Sat Feb 26, 2005 9:19 pm    Post subject: Reply with quote

Quote:
>Hah! i found the solution, i keep the way to get there so that others can read it, too.
The correct code is:
Code:
$*SC029::
Send,{vkDCsc029}
return


I'm sorry, I wasn't clear enough. I meant to indicate that you have to find both the virtual key code (vk) and the scancode (sc). "FF" is simply an example of a virtual key.
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Sat Feb 26, 2005 9:51 pm    Post subject: Reply with quote

db(A) wrote:
no additional language is specified, if it was, how do i disable that?
It's in the FAQ. By the way, which keys do you press to get caret (^)? Is it an AltGr combination? If I can reproduce this problem on a German keyboard layout, I'll consider it a bug and try to fix it.

Quote:
i want AHK to press a Keystroke with delay, i tried that but somehow the delay doenst work:
If you want the delay to all Send commands in the script, move the SetKeyDelay to the top of the script. Otherwise, move it inside the subroutine:

Xbutton1::
SetKeydelay,20,10
send,{4}{5}{6}{7}
return
Back to top
View user's profile Send private message Send e-mail
Guest






PostPosted: Sat Feb 26, 2005 10:45 pm    Post subject: Reply with quote

Quote:
By the way, which keys do you press to get caret (^)

It is the Key left of 1

Thanks.
Back to top
AGU
Guest





PostPosted: Sun Feb 27, 2005 12:30 am    Post subject: Reply with quote

just to mention. Wink

There exists a relative young but constantly growing german forum. So if german is your mother tongue then you could maybe post in the german forum.

www.autohotkey.de.vu/forum
Back to top
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Sun Feb 27, 2005 11:46 pm    Post subject: Reply with quote

I tried the German keyboard layout and the key you mentioned is a dead key. As far as I know, it is completely normal for it to require two presses to get a single caret, regardless of whether AutoHotkey is running.

The ^ on the German keyboard layout is used to produce diacritic vowels. For example, if I type ^ followed by the letter A, I get Â.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   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