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 

Assigning function keys

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



Joined: 31 Jan 2006
Posts: 12

PostPosted: Thu Jun 07, 2007 2:27 pm    Post subject: Assigning function keys Reply with quote

Is there a way to assign function keys (F12, etc) the same way as one can use the ctrl, alt, shift & winkey?

I haven't seen anything in the help or on the forum about this.

Cheers, Tom.
Back to top
View user's profile Send private message
daonlyfreez



Joined: 16 Mar 2005
Posts: 745
Location: Berlin

PostPosted: Thu Jun 07, 2007 2:53 pm    Post subject: Reply with quote

Wrong forum, but, yes you can...


Code:
F12::MsgBox hi

_________________
(sorry, homesite offline atm)
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
boardtc



Joined: 31 Jan 2006
Posts: 12

PostPosted: Thu Jun 07, 2007 4:41 pm    Post subject: Reply with quote

daonlyfreez wrote:
Wrong forum, but, yes you can...


Thanks, should I move it?

Quote:
Code:
F12::MsgBox hi

That works, however
F12e::MsgBox hi
gives an error on reload. I want to be able to use F12, etc like the alt, ctrl and Winkey to have shortcut ket combos how can I have a shortcut for eg. F12+e?
Back to top
View user's profile Send private message
jps



Joined: 02 Sep 2006
Posts: 253
Location: Scotland

PostPosted: Thu Jun 07, 2007 4:55 pm    Post subject: Reply with quote

Code:
F12 & e::MsgBox hi
Back to top
View user's profile Send private message
boardtc



Joined: 31 Jan 2006
Posts: 12

PostPosted: Thu Jun 07, 2007 5:01 pm    Post subject: Reply with quote

jps wrote:
Code:
F12 & e::MsgBox hi


Thanks. Fantastic. Perhaps they could update the Hotkeys help page with this information
Back to top
View user's profile Send private message
engunneer



Joined: 30 Aug 2005
Posts: 6772
Location: Pacific Northwest, US

PostPosted: Thu Jun 07, 2007 5:43 pm    Post subject: Reply with quote

you mean this part?
Help Page:Hotkeys/Custom Combinations wrote:

You can define a custom combination of two keys (except joystick buttons) by using " & " between them. In the below example, you would hold down Numpad0 then press the second key to trigger the hotkey:

Numpad0 & Numpad1::MsgBox You pressed Numpad1 while holding down Numpad0.
Numpad0 & Numpad2::Run Notepad

In the above example, Numpad0 becomes a prefix key; but this also causes Numpad0 to lose its original/native function when it is pressed by itself. To avoid this, a script may configure Numpad0 to perform a new action such as one of the following:
Code:

Numpad0::WinMaximize A   ; Maximize the active/foreground window.
Numpad0::Send {Numpad0}  ; Make the release of Numpad0 produce a Numpad0 keystroke. See comment below.

The presence of one of the above hotkeys causes the release of Numpad0 to perform the indicated action, but only if you did not press any other keys while Numpad0 was being held down.

_________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM
Back to top
View user's profile Send private message Visit poster's website
boardtc



Joined: 31 Jan 2006
Posts: 12

PostPosted: Thu Jun 07, 2007 10:56 pm    Post subject: Reply with quote

i mean to mention function keys
Back to top
View user's profile Send private message
engunneer



Joined: 30 Aug 2005
Posts: 6772
Location: Pacific Northwest, US

PostPosted: Thu Jun 07, 2007 11:10 pm    Post subject: Reply with quote

Ah, so you mean this:

Help File:key list wrote:

F1 through F24 - The 12 or more function keys at the top of most keyboards.

_________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM
Back to top
View user's profile Send private message Visit poster's website
boardtc



Joined: 31 Jan 2006
Posts: 12

PostPosted: Fri Jun 08, 2007 12:03 am    Post subject: Reply with quote

I did not see that, I admit, thanks. Adding this to the symbol table would be more clear. Also adding function keys to the index would be useful
Back to top
View user's profile Send private message
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