Take a look at our
ThinkPads.com HOME PAGE
For those who might want to contribute to the blog, start here: Editors Alley Topic
Then contact Bill with a Private Message

Remapping the Fn Key?

Performance, hardware, software, general buying and gaming discussion..
Post Reply
Message
Author
Paranoid_TP_User
Posts: 48
Joined: Tue May 16, 2006 9:11 am
Location: Ireland

Remapping the Fn Key?

#1 Post by Paranoid_TP_User » Sat Feb 24, 2007 8:43 pm

Hi guys,

So I have a remote control for my computer that requires a key mapping software to send commands/mouse movements. However, I would really like to access the Fn Key, which is not recognised by this software (It says it sees 0xFF and I don't know what that means). Specifically I want to be able to turn off the monitor with Fn+F3.

Does anyone have any ideas as to how I might map this Key or the Fn+F3 functionality to another key? I would really appreciate any input. Cheers,

Al
My Thinkpad: 2669H2G (T43P)
P M 770(2.13GHz), 2GB RAM, 60GB 7200rpm HD, 15in 1600x1200 LCD, 128MB ATI FireGL V3200

RealBlackStuff
Admin Emeritus
Admin Emeritus
Posts: 24727
Joined: Mon Sep 18, 2006 5:17 am
Location: Loch Garman, Éire

#2 Post by RealBlackStuff » Sun Feb 25, 2007 4:39 am

Someone has managed that using Linux http://wiki.foosel.net/linux/t43
Scroll 3/4 down to 'ACPI scripts'.
Perhaps that gives you an idea.
IBM wrote:A key-remapping software utility comes with many new ThinkPad notebooks, enabling you to assign other functions to keys. For example, you can assign the Microsoft® Windows® key function to a key on a ThinkPad keyboard, such as the left or right Alt or Ctrl key.
from: http://www-03.ibm.com/able/solution_off ... mfort.html

Here is some more mapping-info: http://www.paul.sladen.org/thinkpad-r31/thinkpad.html

And I just found this: http://www.autohotkey.com/
Lovely day for a Guinness! (The Real Black Stuff)
But I actually prefer Murphy's from Cork!

Paranoid_TP_User
Posts: 48
Joined: Tue May 16, 2006 9:11 am
Location: Ireland

#3 Post by Paranoid_TP_User » Sun Feb 25, 2007 7:17 pm

Hey thanks for the reply. The autohotkey app is interesting, although they have a lot of trouble with the Fn key specifically, but looking around their forums it looks like there is a solution I can use if I write a short script because I don't neet to map any other key onto the Fn button (Seems like a lot of people wish that the Fn anf L-Ctrl buttons were reversed). I will give that a go when I have the chance.

Amazingly, mapping of all of the thinkpad functions except the Fn+F3 shortcut is supported in the Keyboard customiser utility in the latest version, if they added that functionality that would be y problem solved.
My Thinkpad: 2669H2G (T43P)
P M 770(2.13GHz), 2GB RAM, 60GB 7200rpm HD, 15in 1600x1200 LCD, 128MB ATI FireGL V3200

w0qj
ThinkPadder
ThinkPadder
Posts: 1188
Joined: Fri Jun 11, 2004 9:53 pm
Location: Hong Kong

#4 Post by w0qj » Sat Mar 03, 2007 12:07 am

The KeyTweak program is very good, it remaps keys via Windows Registry, and you can even uninstall it afterwards and still keep your new keyboard settings.

No RAM usage, no program to slow down your computer... i've used it to add a Windows Start Key to my T42, and also a Context Menu key too...

http://webpages.charter.net/krumsick

Highly recommended...

Paranoid_TP_User
Posts: 48
Joined: Tue May 16, 2006 9:11 am
Location: Ireland

#5 Post by Paranoid_TP_User » Sun Mar 04, 2007 8:45 pm

w0qj wrote:The KeyTweak program is very good, it remaps keys via Windows Registry, and you can even uninstall it afterwards and still keep your new keyboard settings.

No RAM usage, no program to slow down your computer... i've used it to add a Windows Start Key to my T42, and also a Context Menu key too...

http://webpages.charter.net/krumsick

Highly recommended...
It was a nice try for but for my purposes did not work, the first clue was the notice on their webpage:
Can I remap my Fn key on my laptop? Probably not. The Fn key translates scancodes before KeyTweak can see them.
My Thinkpad: 2669H2G (T43P)
P M 770(2.13GHz), 2GB RAM, 60GB 7200rpm HD, 15in 1600x1200 LCD, 128MB ATI FireGL V3200

benlimanto
Freshman Member
Posts: 55
Joined: Fri May 20, 2022 12:21 pm
Location: Surabaya, East Java, Indonesia
Contact:

Re: Remapping the Fn Key?

#6 Post by benlimanto » Fri Sep 02, 2022 8:15 pm

Hello, sorry for bumping into an old thread. I found a way to make FN work, but not as a combination key in one press, but based on step, take example, I want my X220 fn+f3 mapped to changing the battery profile on windows 7 (I only test this on Win7), so using AHK/AutoHotkey, we can map it using this code :

Code: Select all

; Workaround for FN Key
SC163::
FnKey=1
Sleep, 1000
FnKey=0
return
;Power Scheme GUID: 381b4222-f694-41f0-9685-ff5bb260df2e  (Balanced)
;Power Scheme GUID: 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c  (High performance)
;Power Scheme GUID: a1841308-3541-4fab-bc81-f71556f20b4a  (Power saver) * 
#If FnKey=1
F3::
;tmp := ComObjCreate("WScript.Shell").Exec("powercfg.exe -GETACTIVESCHEME").StdOut.ReadAll()
pwr:= DllCall("powrprof.dll\PowerGetActiveScheme", "Ptr", 0, "Ptr*", oldSchemeGUID, "Uint")
pwr:= Dllcall("powrprof.dll\PowerReadFriendlyName", "Ptr", 0, "Ptr", oldSchemeGUID, "Ptr", 0, "Ptr", 0, "Ptr", 0, "Ptr*", szdesc) 
;sdesc :LPDWORD
sleep 150
;MsgBox % szdesc
;if (InStr(tmp,"Power saver") == 0)
if (szdesc == 126)
{
  Run, powercfg.exe -SETACTIVE a1841308-3541-4fab-bc81-f71556f20b4a,, "Hide"
}
else 
{
  Run, powercfg.exe -SETACTIVE 381b4222-f694-41f0-9685-ff5bb260df2e,, "Hide"
}
; Choose the second power plan in the list
; Revert to default plan and cleanup
FnKey=0
return
What this code do is, it catch the FN key using SC163, because in thinkpad X220, thank god, it is readable key, so we can use it as a short toggle in 1s by pressing it, then press another F3 key. so we press FN first, then F3, but NOT AT THE SAME TIME! You can test the powrprof.dll output using your own number on your computer, or do anything else with it. At least, with this, it close the gap of lenovo enhanced experince that I don't get from windows 7, sadly, and I don't want to do win7 restore, because of cummulative update and patch that I already done. it also make the other FNFX key overwriteable, but in different way, and you also could by theory, map FN+A to FN+anything on the keyboard, just your muscle memory need to remember that those remap, you need to release the FN, then press the other key, in order to make it work.

This approach based on

https://www.autohotkey.com/board/topic/ ... /?p=639524
https://www.autohotkey.com/boards/viewtopic.php?t=68530
https://www.autohotkey.com/board/topic/ ... using-ahk/

Hope this helps!
X220 with Win 10 21H2 Fedora 38 XFCE 4.18 (official spins)
i7-2640m, disabled Hyper Thread, Temp Drop on average 10*C, all core activated, need KVM for Windows
12gb RAM (enough for now, DDR3L)
480 Kingston Fake SSD
64gb Samsung SD Card
Recently rolled back to Windows 7 from Win 10 21H2. Sad

Post Reply

Return to “Thinkpad - General HARDWARE/SOFTWARE questions”

Who is online

Users browsing this forum: No registered users and 78 guests