Is it possible to use AppsKey or other keys as modifier

2

Is it possible to use AppsKey (context menu key) or other keys as modifier using AutoHotKey program?

PHPst

Posted 2012-06-01T06:11:01.233

Reputation: 3 466

See this discussion may be its what you are looking for. As you have not told what have you tried yet.

– avirk – 2012-06-01T06:28:20.760

Glad to help you. So should I post that as an answer? – avirk – 2012-06-02T04:45:05.817

@avirk Actually I found answer in the documentation page that your link refers to, so it is better that you make an answer from that page. – PHPst – 2012-06-02T06:12:14.800

Answers

2

I don't know much about AHK scripting so if there anything wrong anyone can fix it and this is from here.

;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

Or you can do this...

AppsKey & Ctrl::    ; AppsKey, then Ctrl  
^AppsKey::          ; Ctrl, then AppsKey  
    Hotkey, *r, ^@r, On  
   ; additional hotkeys can be enabled here.  
return  
AppsKey & Ctrl Up:: ; Modifier(s) released   
^AppsKey Up::  
    Hotkey, *r, Off  
    ; additional hotkeys must be disabled here.  
return  
^@r:    ; Label for identification only, can be anything.  
    msgbox, hello... %A_ThisLabel%  
return

avirk

Posted 2012-06-01T06:11:01.233

Reputation: 15 151

1@avrik, To format an inline sample of code, surround the text with backticks, e.g. `CODE`. To format a block of code, indent each line of text with 4 spaces, or use the Code Sample button on the Editor Toolbar. :) – iglvzx – 2012-06-02T21:54:25.073

@iglvzx thanks for the edit. I will keep that in mind next time. – avirk – 2012-06-03T14:59:48.680