Skip to content

Instantly share code, notes, and snippets.

@karolzlot
Last active April 11, 2022 05:43
Show Gist options
  • Save karolzlot/f77c5e476cd9a924c81bc76fa2752dc1 to your computer and use it in GitHub Desktop.
Save karolzlot/f77c5e476cd9a924c81bc76fa2752dc1 to your computer and use it in GitHub Desktop.
How to remap Logitech k740 function keys with autohotkey
; This file is autohotkey v2 script.
#SingleInstance Force
#Warn ; Enable warnings to assist with detecting common errors.
SendMode "Input" ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir A_ScriptDir ; Ensures a consistent starting directory.
InstallKeybdHook ; how it works: https://lexikos.github.io/v2/docs/commands/InstallKeybdHook.htm
Browser_Home::Send "Fn_F1 " ; Fn+F1
Launch_Mail::Send "Fn_F2 " ; Fn+F2
Browser_Search::Send "Fn_F3 " ; Fn+F3
; Fn+4 (not detected by autohotkey)
; Fn+5 (not detected by autohotkey)
; Fn+6 (not detected by autohotkey)
Launch_App2::Send "Fn_F7 " ; Fn+F7
; Fn+8 (not detected by autohotkey)
Launch_Media::Send "Fn_F9 " ; Fn+F9
Media_Prev::Send "Fn_F10 " ; Fn+F10
Media_Play_Pause::Send "Fn_F11 " ; Fn+F11
Media_Next::Send "Fn_F12 " ; Fn+F12
AppsKey::Send "Fn_PrtSc " ; Fn+PrtSc
ScrollLock::Send "Fn_Pause " ; Fn+Pause
; More info, may be helpful to make the rest of keys working one day:
; https://www.autohotkey.com/boards/viewtopic.php?t=80232
; https://www.autohotkey.com/boards/viewtopic.php?t=59056
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment