Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Multiple Letter Hotkeys


  • Please log in to reply
8 replies to this topic
aarongoble
  • Members
  • 3 posts
  • Last active: Oct 07 2005 03:32 PM
  • Joined: 07 Oct 2005
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.

Peepsalot
  • Members
  • 24 posts
  • Last active: Dec 16 2005 04:53 PM
  • Joined: 06 Oct 2005
Try using ampersand "&"
http://www.autohotke...ocs/Hotkeys.htm

Laszlo
  • Moderators
  • 4713 posts
  • Last active: Mar 31 2012 03:17 AM
  • Joined: 14 Feb 2005
...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.

aarongoble
  • Members
  • 3 posts
  • Last active: Oct 07 2005 03:32 PM
  • Joined: 07 Oct 2005
chaining together with ampersand doesn't work. Can you give me a small example script laszlo.

Laszlo
  • Moderators
  • 4713 posts
  • Last active: Mar 31 2012 03:17 AM
  • Joined: 14 Feb 2005
Actually, Input is better than GetKeyState
#^r::

Input key, I L1

IfEqual key,a

   MsgBox r & a

IfEqual key,b

   MsgBox r & b

Return


aarongoble
  • Members
  • 3 posts
  • Last active: Oct 07 2005 03:32 PM
  • Joined: 07 Oct 2005
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.

deanhill1971
  • Members
  • 58 posts
  • Last active: Dec 17 2011 02:42 AM
  • Joined: 30 Sep 2005
I just experimented with combination keys like the following.
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.

Laszlo

...but there are physical limitations: some keyboards (e.g. Dell) cannot detect certain multiple key presses.



Laszlo
  • Moderators
  • 4713 posts
  • Last active: Mar 31 2012 03:17 AM
  • Joined: 14 Feb 2005

...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.

Decarlo110
  • Members
  • 303 posts
  • Last active: Feb 12 2006 02:15 AM
  • Joined: 15 Dec 2004
I can't answer your question, but try the following:
~y & u:: 
   msgbox, hi there 
return
From the Helpfile:

~ 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.opensourc...ition_plain.php

2) Intuitive. Logical. Versatile. Adaptable. <>