| View previous topic :: View next topic |
| Author |
Message |
aarongoble
Joined: 07 Oct 2005 Posts: 3
|
Posted: Fri Oct 07, 2005 2:34 pm Post subject: Multiple Letter Hotkeys |
|
|
| I have looked everywhere and could not find anything doing this or tellnig how to do it. Can I assign a hotkey to something using two letters + other key combo, such as, Windows key+Ctrl+r+a for one hotkey and windows key+Ctrl+r+b for another. |
|
| Back to top |
|
 |
Peepsalot
Joined: 06 Oct 2005 Posts: 24
|
|
| Back to top |
|
 |
Laszlo
Joined: 14 Feb 2005 Posts: 4710 Location: Boulder, CO
|
Posted: Fri Oct 07, 2005 4:45 pm Post subject: |
|
|
| ...but there are physical limitations: some keyboards (e.g. Dell) cannot detect certain multiple key presses. It is safer to use key combinations, when you release the first key. It can be done with If GetKeyState("KeyName") -like cases inside the first hotkey routine. |
|
| Back to top |
|
 |
aarongoble
Joined: 07 Oct 2005 Posts: 3
|
Posted: Fri Oct 07, 2005 5:44 pm Post subject: |
|
|
| chaining together with ampersand doesn't work. Can you give me a small example script laszlo. |
|
| Back to top |
|
 |
Laszlo
Joined: 14 Feb 2005 Posts: 4710 Location: Boulder, CO
|
Posted: Fri Oct 07, 2005 6:04 pm Post subject: |
|
|
Actually, Input is better than GetKeyState | Code: | #^r::
Input key, I L1
IfEqual key,a
MsgBox r & a
IfEqual key,b
MsgBox r & b
Return |
|
|
| Back to top |
|
 |
aarongoble
Joined: 07 Oct 2005 Posts: 3
|
Posted: Fri Oct 07, 2005 6:36 pm Post subject: |
|
|
Thanks that little script helped me figure out what I am going to use.
#^r::
Input, userKey, I L2
If userKey = bs
So the user hits the hotkey then can type bs to run the macro.
I can add different strings to each hotkey to free up a lot of different options. |
|
| Back to top |
|
 |
deanhill1971
Joined: 30 Sep 2005 Posts: 58 Location: Fort Wayne, IN
|
Posted: Wed Nov 09, 2005 9:19 pm Post subject: |
|
|
I just experimented with combination keys like the following.
| Code: | y & u::
msgbox, hi there
return
|
Pressing 'y' and 'u' simultaneously shows the msgbox, but now my 'y' key does nothing when pressed singly. Am I running into what Laszlo wrote below? I have an IBM keyboard plugged into a Dell port replicator.
| Quote: |
Laszlo
...but there are physical limitations: some keyboards (e.g. Dell) cannot detect certain multiple key presses. |
|
|
| Back to top |
|
 |
Laszlo
Joined: 14 Feb 2005 Posts: 4710 Location: Boulder, CO
|
Posted: Wed Nov 09, 2005 9:30 pm Post subject: |
|
|
| help wrote: | | ...becomes a prefix key. Prefix keys can also be assigned their own actions ..., but their action will only be triggered when the key is released and only if you did not press any other keys while the key was begin held down | The problem is that your y key is now a prefix key with different behavior. You can define actions for it, but it won't aouto-repeat, Shift, CapsLock behaves differently with it, so it is better not to use this kind of combinations with normal keyboard keys. |
|
| Back to top |
|
 |
Decarlo110
Joined: 15 Dec 2004 Posts: 303 Location: United States
|
Posted: Wed Nov 09, 2005 9:36 pm Post subject: |
|
|
I can't answer your question, but try the following:
| Code: | ~y & u::
msgbox, hi there
return |
From the Helpfile:
| Quote: | ~ This hotkey's native function shouldn't be suppressed (hidden from the system) when the hotkey fires.
This feature is not supported on Windows 95/98/ME. |
_________________ 1) The Open Source Definition http://www.opensource.org/docs/definition_plain.php
2) Intuitive. Logical. Versatile. Adaptable. <<AutoHotkey>> |
|
| Back to top |
|
 |
|