Jump to content

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

Using Appskey as a modifier key


  • Please log in to reply
2 replies to this topic
camerb
  • Moderators
  • 573 posts
  • Last active: Sep 14 2015 03:32 PM
  • Joined: 19 Mar 2009
I'd like to use Appskey as a modifier key (also described as a prefix key).

I took some approaches from <!-- m -->http://www.autohotke...ocs/Hotkeys.htm<!-- m --> and came up with this:
;Try out new hotkey mappings (Ctrl+Appskey+'R')
AppsKey & r::
if not GetKeyState("Control")  ; Neither the left nor right Control key is down.
    return  ; i.e. Do nothing.
msgbox, hello... ctrl appskey r
return

But, I'd really like for the hotkey to be a bit more readable, like:
Control & AppsKey & r::

Or even:
^AppsKey & r::

Is anything like that possible? Thanks!

camerb
  • Moderators
  • 573 posts
  • Last active: Sep 14 2015 03:32 PM
  • Joined: 19 Mar 2009
BUMP... (still looking for an answer)

Lexikos
  • Administrators
  • 9844 posts
  • AutoHotkey Foundation
  • Last active:
  • Joined: 17 Oct 2006
I don't know if it's more readable, but it is more accurate:
AppsKey & Ctrl::    ; AppsKey, then Ctrl
^AppsKey::          ; Ctrl, then AppsKey
    Hotkey, *r, ^@r, On
    [color=darkgray]; additional hotkeys can be enabled here.[/color]
return
AppsKey & Ctrl Up:: ; Modifier(s) released
^AppsKey Up::
    Hotkey, *r, Off
    [color=darkgray]; additional hotkeys must be disabled here.[/color]
return
^@r:    ; Label for identification only, can be anything.
    msgbox, hello... %A_ThisLabel%
return
Using the Hotkey command this way allows basically any number of arbitrary keys in a hotkey.

Is anything like that possible?

If you mean shorthand for a custom combination with three keys, then no. (Unless someone writes/has written a function for it, using techniques like the one demonstrated above.)