Fn combination of keys

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
deickos
Posts: 18
Joined: 03 Sep 2021, 19:46

Fn combination of keys

Post by deickos » 22 Jun 2022, 14:20

now i have something more difficult
in my old thinkpad laptop a combination of FN + pgup turns on the keyboard light
this is done by a power driver
but pgup does not work so i assigned it to F6
how am i to accomplish the combination and turn on the light? fn + f6 does not do it

User avatar
mikeyww
Posts: 26600
Joined: 09 Sep 2014, 18:38

Re: Fn combination of keys

Post by mikeyww » 22 Jun 2022, 18:27


deickos
Posts: 18
Joined: 03 Sep 2021, 19:46

Re: Fn combination of keys

Post by deickos » 23 Jun 2022, 08:10

mikeyww wrote:
22 Jun 2022, 18:27
You cannot necessarily do it, but some information is below.

viewtopic.php?p=394008#p394008

viewtopic.php?f=76&t=81807

viewtopic.php?p=367333#p367333

viewtopic.php?t=59644


i kept this from the 3rd suggestion
The point of this is that if your Fn does not generate an event, then you cannot use AHK to control the key, unless one of the alternate solutions works.

i still can turn on the light through a fan controlling software (thinkpadFanControl) that has some bonus functions -
if a program can achieve the combination of keys why AHK shouldn't? that is the question

RussF
Posts: 1242
Joined: 05 Aug 2021, 06:36

Re: Fn combination of keys

Post by RussF » 23 Jun 2022, 09:29

The keyboard on my PC has no Fn key. Why? Because Fn is not a standard defined PC key. It is manufacturer-specific and most keyboard drivers do not expose that key to the operating system. Look at the laptop keyboards from different manufacturers and you will find a wide variation on the functions performed by each Fn-Key combination. While Fn-PgUp turns on the keyboard lights on your Thinkpad, Fn-F10 does the same thing on my Dell. There is NO standard combination.
deickos wrote: if a program can achieve the combination of keys why AHK shouldn't? that is the question
Manufacturers intercept Fn key combinations at the (machine specific) BIOS level and act on them there. It would be impractical to create generic software like AHK to work with every single manufacturer's specific implementation of the Fn key combinations - even IF you could intercept the keypress (which in virtually all cases, you cannot).
deickos wrote: i still can turn on the light through a fan controlling software (thinkpadFanControl) that has some bonus functions
Of course you can, because it is ThinkPad's software running on a ThinkPad computer. I hope I've answered your questions.

Russ

deickos
Posts: 18
Joined: 03 Sep 2021, 19:46

Re: Fn combination of keys

Post by deickos » 23 Jun 2022, 10:44

RussF wrote:
23 Jun 2022, 09:29
I hope I've answered your questions.Russ
you have some good points there but we still have to turn the light on using some new combination of keys - any ideas on that or do you think cannot be done?

RussF
Posts: 1242
Joined: 05 Aug 2021, 06:36

Re: Fn combination of keys

Post by RussF » 23 Jun 2022, 11:36

Only two things come to mind, but both require disassembly of your laptop, so depending on how comfortable you are with that, you may want to have a professional do it. Youtube is full of instructional videos on laptop disassembly, perhaps there is one specifically for your model.

First, you must disassemble the laptop far enough to remove the keyboard. Most laptop keyboards are a membrane type. Some can be further disassembled to to remove the conductive rubber membrane from between the keys and the circuit board. Some cannot. I can't speak to your particular model.

One of the most common failures of individual keys on a membrane keyboard is dirty or oxidized contacts on the circuit board. Each key pushes down a little dome on the membrane (which is conductive) to bridge a pair of contacts on the board. If you can clean both the membrane and the contact pads with alcohol or switch contact cleaner, most times that will fix the problem.

If you can't get the keyboard disassembled, you can probably find a replacement for it, depending on just how old it is.

If you are mechanically inclined and dexterous enough to work with very small screws and cable connectors (and understand how to properly release the locking mechanism on those connectors), it is really a fairly simple process - I have done several.

Other than that, I have no other suggestions from a software or programmatic aspect. Good luck.

Russ

deickos
Posts: 18
Joined: 03 Sep 2021, 19:46

Re: Fn combination of keys

Post by deickos » 23 Jun 2022, 15:41

RussF wrote:
23 Jun 2022, 11:36
One of the most common failures of individual keys on a membrane keyboard is dirty or oxidized contacts on the circuit board. Each key pushes down a little dome on the membrane (which is conductive) to bridge a pair of contacts on the board. If you can clean both the membrane and the contact pads with alcohol or switch contact cleaner, most times that will fix the problem.
Russ
Actually the reason i resorted to ahk for fixing these issues was i couldn't think of anything and no-one (until you) would come up with an idea for the kb. The kb actually is new but because of an accident, that indeed involved humidity, the far right keys (pgup, home, delete) would not work. The only thing i tried is to put the kb under sunlight in the summer but nothing happened. Instead of buying a new for at least 60$ (this one is also new) or a used with half the money, i thought i could try something. But i never opened a kb and need some sort of guidance to try something like that.
But i think what you're suggesting may help for older kbs (prior to 2000) - this one from 2011 and kinda doubt if one can just wipe it with alcohol and such...

deickos
Posts: 18
Joined: 03 Sep 2021, 19:46

Re: Fn combination of keys

Post by deickos » 23 Jun 2022, 17:11

Another question - since i assigned pgup to F6 with AHK, why is it that the old combination Fn + pgup = kb light does not work with F6 and Fn + F6 = nothing?

RussF
Posts: 1242
Joined: 05 Aug 2021, 06:36

Re: Fn combination of keys

Post by RussF » 23 Jun 2022, 19:27

deickos wrote: But i think what you're suggesting may help for older kbs (prior to 2000) - this one from 2011 and kinda doubt if one can just wipe it with alcohol and such...
I don't remember saying anything about old keyboards. The last one I successfully disassembled was from 2017. It all depends on the keyboard. Some will come apart, some won't.
deickos wrote: Another question - since i assigned pgup to F6 with AHK, why is it that the old combination Fn + pgup = kb light does not work with F6 and Fn + F6 = nothing?
Again, the Fn key is handled at the hardware level (probably on the keyboard itself). AHK doesn't do the conversion until the scan code for F6 gets to the operating system. Since the Fn keypress doesn't get to the operating system and F6 isn't converted to PgUp UNTIL it gets to the OS - the two can never meet up.

There are many, many threads on this forum requesting help with the Fn key and AHK - I haven't found one yet that ends the way the requester wanted it to. It's just the way it is.

Russ

deickos
Posts: 18
Joined: 03 Sep 2021, 19:46

Re: Fn combination of keys

Post by deickos » 24 Jun 2022, 09:58

RussF wrote:
23 Jun 2022, 19:27
I don't remember saying anything about old keyboards. The last one I successfully disassembled was from 2017. It all depends on the keyboard. Some will come apart, some won't.
Russ
under the caps there were these switches and under them a membrane that was stuck to a metal surface. under the membrane was the contact point that makes things happen, so i took out the membrane and wiped the inside but still no good. i tried this with the Ins key... of course the membrane cannot stick back as before...
And something else - the power on button that's on the kb has a led that's gone dead so i assume humidity has gone deeper but just don't know how to break it all apart...

RussF
Posts: 1242
Joined: 05 Aug 2021, 06:36

Re: Fn combination of keys

Post by RussF » 24 Jun 2022, 10:15

The keyboards I have worked with usually have one large rubber membrane with bumps where the keys are that is sandwiched between the frame that holds the keys and the circuit board.

It sounds like yours has individual, removable membranes for each key. I'm afraid I'm not familiar with those, but the concept should still be the same (unless, of course, the membrane is damaged while trying to get it unstuck :shock: ). Also, usually, any residual adhesive will allow you to reposition the membrane until you get the sandwich back together. Don't dowse the entire membrane in alcohol or contact cleaner. Use a Q-tip or similar to clean each affected contact only.

Russ

deickos
Posts: 18
Joined: 03 Sep 2021, 19:46

Re: Fn combination of keys

Post by deickos » 30 Jun 2022, 00:33

yea i agree Fn+pgup works in the hardware level and not in the OS - specifically it works as Fn+{the upper right key}
I posed another question - how to make the combination Ctrl+Alt+Del when Del is out of order and someone found a solution (haven't tried it yet but assume it works). Maybe something could be done after all...

gregster
Posts: 8921
Joined: 30 Sep 2013, 06:48

Re: Fn combination of keys

Post by gregster » 30 Jun 2022, 00:41

deickos wrote:
30 Jun 2022, 00:33
how to make the combination Ctrl+Alt+Del when Del is out of order and someone found a solution (haven't tried it yet but assume it works). Maybe something could be done after all...
A remap of the Del key alone shouldn't be a problem, as long as you still press both modifiers (Ctrl+Alt) manually.
How about just remapping another key, like Insert, to Del:

Code: Select all

ins::del
Now Ctrl+Alt+Ins works here to trigger the usual Ctrl+Alt+Del action... or use smth like ^!ins::^!del, if you want to keep the Insert key's normal function. Or even shorter: ^!ins::del since remappings in AHK v1 don't release pressed modifiers anyway.

Of course, like usual, if these remaps/combos should work in elevated programs, they need to run elevated as well.

For other key combos, you might have to resort to AutoHotInterception (but then be careful, deactivating the Ctrl+Alt+Del combo completely could lead to data loss).

deickos
Posts: 18
Joined: 03 Sep 2021, 19:46

Re: Fn combination of keys

Post by deickos » 30 Jun 2022, 12:31

gregster wrote:
30 Jun 2022, 00:41

How about just remapping another key, like Insert, to Del:

Code: Select all

ins::del
Now Ctrl+Alt+Ins works here to trigger the usual Ctrl+Alt+Del action... or use smth like ^!ins::^!del, if you want to keep the Insert key's normal function. Or even shorter: ^!ins::del since remappings in AHK v1 don't release pressed modifiers anyway.

I have remapped Del with F12 (Ins is out as well): F12::Send, {del}
but ctrl+Alt+ F12 does not trigger anything

gregster
Posts: 8921
Joined: 30 Sep 2013, 06:48

Re: Fn combination of keys

Post by gregster » 30 Jun 2022, 13:05

deickos wrote:
30 Jun 2022, 12:31
I have remapped Del with F12 (Ins is out as well): F12::Send, {del}
but ctrl+Alt+ F12 does not trigger anything
F12::Send, {del} doesn't work either for me, but the remapping, which works internally a bit differently (for details, see docs), of F12 does:

Code: Select all

F12::del
(if the permissions of script and app match up)

deickos
Posts: 18
Joined: 03 Sep 2021, 19:46

Re: Fn combination of keys

Post by deickos » 30 Jun 2022, 13:59

gregster wrote:
30 Jun 2022, 13:05

F12::Send, {del} doesn't work either for me, but the remapping, which works internally a bit differently (for details, see docs), of F12 does:

Code: Select all

F12::del
(if the permissions of script and app match up)
yea it works! :P

have you any suggestions for the (Fn+pgup = kb light) issue discussed here?

gregster
Posts: 8921
Joined: 30 Sep 2013, 06:48

Re: Fn combination of keys

Post by gregster » 30 Jun 2022, 18:43

Not really, Fn is not a standard key, afaik.
Whatever a vendor does with it, might vary a lot. You can only try and see what works, I guess.

deickos
Posts: 18
Joined: 03 Sep 2021, 19:46

Re: Fn combination of keys

Post by deickos » 01 Jul 2022, 13:34

gregster wrote:
30 Jun 2022, 18:43
Not really, Fn is not a standard key, afaik.
Whatever a vendor does with it, might vary a lot. You can only try and see what works, I guess.
the problem with f6 that substituted pgup (for pdf word etc) is that it has a special function with Fn already in the hardware drivers - thus fn+f6 cannot work otherwise

Post Reply

Return to “Ask for Help (v1)”