Skip to content

Instantly share code, notes, and snippets.

@GetoXs
Created August 16, 2020 11:48
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save GetoXs/2b80ae4b838924af7f99e941fe09c94c to your computer and use it in GitHub Desktop.
Save GetoXs/2b80ae4b838924af7f99e941fe09c94c to your computer and use it in GitHub Desktop.
Workaround for keyboard HP TPC-P001K Fn lock problem
  • Download and install the program AutoHotKey https://www.autohotkey.com/

  • Save file below (i just cared about F1-F5 but you can extend it on your own if needed):

  • Doubleclick it (it is an autohotkey script and will be executed by autohotkey, test if it runs to your liking. To terminate it, use the green AutoHotKey icon in your taskbar (Rightclick > Exit)

  • If you do like it, put it into your Windows Startup Folder to have it launched on boottime

  • Enjoy your reverted-back-to-normal Function Keys.

Source: https://h30434.www3.hp.com/t5/Desktop-Hardware-and-Upgrade-Questions/HP-Pavilion-All-in-One-27-r017ur-How-revert-Function-Keys-to/m-p/7134224/highlight/true#M175394

#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#InstallKeybdHook
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
; F1 key by default, Fn+F1 is now Mute/Unmute
VOLUME_MUTE::F1
F1::VOLUME_MUTE
; F2 key by default, Fn+F2 is now Volume Down
VOLUME_DOWN::F2
F2::VOLUME_DOWN
; F3 key by default, Fn+F3 is now Volume Up
VOLUME_UP::F3
F3::VOLUME_UP
; F4 key by default, Fn+F4 is now Media Prev
MEDIA_PREV::F4
F4::MEDIA_PREV
; F5 key by default, Fn+F5 is now Play/Pause
MEDIA_PLAY_PAUSE::F5
F5::MEDIA_PLAY_PAUSE
@ToBinio
Copy link

ToBinio commented Sep 22, 2021

Thanks man <3

@magpineline
Copy link

you are a fucking saint

@magpineline
Copy link

how do i extend this i dont know authotkey i want all 12 keys off

@ToBinio
Copy link

ToBinio commented Dec 5, 2022

you just have to copy one of the "blocks" and changed them to your needs.
here is a link to all possible Keys

e. g:
iff you want that f9 opens your emails

LAUNCH_MAIL::F9
F9::LAUNCH_MAIL

sadly not all keyboards have the same fn key mapping so my f9 may does something diffrent than yours.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment