Function keys secondary function key name in AHK ?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
DrMaximum
Posts: 3
Joined: 11 Mar 2018, 07:13

Function keys secondary function key name in AHK ?

Post by DrMaximum » 27 Jul 2021, 10:04

Hi,

So on my keyboard, pressing the F1, F2, ... keys will default to the secondary functions like brightness, volume, ...

Now I want to remap the F3 key's secondary function, which is 'Task View' on my board, to something else

But what is the name of 'Task View' button in AHK ? Just F3 like below dosn't work for me, then I'll have to actually also press the 'FN' key, no bueno

Code: Select all

F3::    
Send, Something Else
return
I need something like this :

Code: Select all

TaskView::      ; something like this, however this dosn't work unfortunately, incorrect script won't even start
Send, Something Else
return

Anyone got any idea ? Can't seem to find a list of this anywhere

Thanks for any help

Ianizer
Posts: 79
Joined: 07 Mar 2021, 00:06

Re: Function keys secondary function key name in AHK ?

Post by Ianizer » 27 Jul 2021, 10:43

Run the script below, press the Task View key once it's running, then press F5 and you should see the name of the key inside the window that appeared.

Code: Select all

KeyHistory
Escape::ExitApp

DrMaximum
Posts: 3
Joined: 11 Mar 2018, 07:13

Re: Function keys secondary function key name in AHK ?

Post by DrMaximum » 27 Jul 2021, 11:02

It doesn't show anything that way, but if I try to run a Keyboardhook I do get a reading '5B' and '15B'

So I tried both

Code: Select all

VK5B::
Send, Something Else
return

Code: Select all

SC15B::
Send, Something Else
return
then the button press works, but I get some strange behaviour;
it only prints 'Somethin E' and then immediately logs me out... (same for both)

very weird, so close though

Ianizer
Posts: 79
Joined: 07 Mar 2021, 00:06

Re: Function keys secondary function key name in AHK ?

Post by Ianizer » 27 Jul 2021, 13:23

Very strange. This might work (I can't test it because I don't have the key on my keyboard):

Code: Select all

SC15B::
Send, Something Else
return
SC15B Up::return ;maybe releasing the key messes it up, so make it do nothing at all when released. if this doesn't work, i'm out of ideas

DrMaximum
Posts: 3
Joined: 11 Mar 2018, 07:13

Re: Function keys secondary function key name in AHK ?

Post by DrMaximum » 27 Jul 2021, 15:58

Strange the exact same thing still. The way it only prints 'Somethin E' ... so weird

Going the other route at the moment, set the keyboard to where function Keys are normal, as in F1 is F1,..( no 'FN' modifier needed )

And then use AHK to bind brightness, volume, media,... to the normal F1, F2, ...function keys.

Except for F3 (which used to be task view) and remap it F3 to F2 (for easy rename filename in Win, which was my intent :)

Then map LWIN key + F1,... to just F1 and all the way to F12, so that can still use F1, F2, ...


Almost got it to work, only change brightness script won't work with the other scripts combined for now

it'll get there, tomorrow :)

Post Reply

Return to “Ask for Help (v1)”