So I am very, very new to AutoHotKey. I've looked through the tutorial and this forum and can not seem to find an answer to my question.
All I am trying to do is get a set up in which I can press F1, F2, F3... etc. and not have to press and hold the Fn (Function) key.
Short back story to this problem: I have a laptop and the key board has the Fn button for the F1, F2, F3... etc. keys. The reason is that they have other functions hot keyed to the F# keys. Example, without pressing the Fn button F1 opens the HP Help Center window, F2 dims screen, F3 brightens screen, etc. This wouldn't be a problem except that I play the game Diablo II and the F# are used as hot keys to switch between spells, attacks and the like. So when playing I have to press the Fn button (located between Left Control and Windows buttons) and then the F# button I want to press. All I want to do is write a AutoHotKey file that when I am playing Diablo II I do not have to press the Fn button. This causes a lot of problems, since F1 is keyed to my most helpful spell, but without the Fn button pressing it minimizes the Diablo II window and pulls up the HP Help Center Window, which often causes me to be dead by the time I get the game window pulled back up.
Any help on this would be GREATLY appreciated. Also, IDK is it matters, but if it does I only have a background in the languages of HTML (up to 4.o and I have skimmed my HTML 5 book but haven't done much with it), JavaScript and CSS. I am also currently learning Python, which will be my first true programming language.
Thank you.
A Simple Task... I Hope
Started by
LucienVex
, Jun 27 2011 10:01 PM
3 replies to this topic
#1
Posted 27 June 2011 - 10:01 PM
#2
Posted 27 June 2011 - 10:27 PM
[text...] ... I am also currently learning Python, which will be my first true programming language.
Thank you.
And Autohotkey* might be your first true scripting language (and it is pretty good at programming too, if I may say so myself). For me it was the first programming language.
Welcome to the forums, and thanks for the very elaborate description of your problem, and for reading the tutorials.
I'm afraid it might not be as easy as you hope, since the Fn key works in quite a special way (it's a virtual modifier key or something?), so it's not easely manipulated. If you press Ctrl+F1, the computer (and Autohotkey) captures "Ctrl" and "F1", but if you press Fn+F1 the computer (and AHK) captures "HP Help center".
If you hang in for a while someone might guide you to a resolution to the problem by getting virtual keycodes and whatnot.
Otherwise, it might be a possibility to rebind some other key to send a virtual F1 keypress (thus surpassing the filter that probably causes your physical F1s to become "Help Center" pressed)? For example:
; This line is a comment, as are the others to the right of the semicolons
^d:: ; Hotkey: Control+d
Send, {F1} ; Send the keystroke F1
return ; Done*Before someone else corrects you: It's either Autohotkey (which I use), AutoHotkey (ackording to the website) or simply "AHK" for short. Skip the capital K when writing the name out.
#3
Posted 27 June 2011 - 10:31 PM
There are 2 entries on the FN key in the wiki faq
#4
Posted 03 August 2012 - 06:06 AM
[text...] ... I am also currently learning Python, which will be my first true programming language.
Thank you.
And Autohotkey* might be your first true scripting language (and it is pretty good at programming too, if I may say so myself). For me it was the first programming language.
Welcome to the forums, and thanks for the very elaborate description of your problem, and for reading the tutorials.
I'm afraid it might not be as easy as you hope, since the Fn key works in quite a special way (it's a virtual modifier key or something?), so it's not easely manipulated. If you press Ctrl+F1, the computer (and Autohotkey) captures "Ctrl" and "F1", but if you press Fn+F1 the computer (and AHK) captures "HP Help center".
If you hang in for a while someone might guide you to a resolution to the problem by getting virtual keycodes and whatnot.
Otherwise, it might be a possibility to rebind some other key to send a virtual F1 keypress (thus surpassing the filter that probably causes your physical F1s to become "Help Center" pressed)? For example:; This line is a comment, as are the others to the right of the semicolons ^d:: ; Hotkey: Control+d Send, {F1} ; Send the keystroke F1 return ; Done
*Before someone else corrects you: It's either Autohotkey (which I use), AutoHotkey (ackording to the website) or simply "AHK" for short. Skip the capital K when writing the name out.
I think this is most likely more of an issue with his laptop. Most now come configured in a mode that automatically uses the "fn" key for function keys. This can be changed in laptop setup screen. I've no idea if this is the case with desktops, haven't owned a new one in 16 years.




