Map the Input key to Play / Pause on Lenovo laptops, with no flashing console window.
This project is inspired by LenovoPlayPause by FrzMtrsprt.
If you just want to remap the Star / F12 key, you can download it from here.
What this project provides is similar, but it remaps the Input/F11 key, and the process is a bit more involved than the original, which may or may not be worth the effort.
- Fn key press (Input / F11)
β
"Fn and function keys" (Lenovo Driver)
β
tpHKload.exe
β
shtctky.exe
β
LenovoPlayPause.exe
β
(lenovo-companion β lenovo-metro-companion URI forwarding)
On first install, you will be prompted to choose the default app for the URI scheme:
lenovo-companion: This behavior will only happen if Lenovo Vantage is installed, ensure it is installed.
When you press the F11 (Input) key, the app will send media control events such as Play/Pause or Prev Track / Next Track, depending on the modifier keys pressed.
For certain events, LenovoPlayPause.exe forwards them to the lenovo-companion β lenovo-metro-companion URI. This URI forwarding occurs for specific events, and those will be passed to the Lenovo Companion app. However, the forwarding will not happen when F11 is pressed alone or with modifier keys. In those cases, the media control event will be executed locally by the app.
The original project provides basic Play/Pause functionality when the F12 (Star) key is pressed, with modifier keys handled by Lenovo Keyboard Manager.
This app, however, remaps the F11 (Input) key for Play/Pause functionality, and internally handles modifier keys for additional media controls:
- Left Ctrl + F11 or Left Alt + F11 will send the Prev Track command.
- Right Ctrl + F11 or Right Alt + F11 will send the Next Track command.
- F11 without modifiers will send the Play/Pause command.
This allows for customized media control based on the state of the modifier keys, leaving you with a free F12 keymapping.
- Clone the repository
- Open the project in Visual Studio
- Change the C++ version to ISO C++20
- Compile
LenovoPlayPause.exe - Package as MSIX β required for installation.
- Ensure the package includes the
runFullTrustcapability in the appxmanifest.xml file. - For detailed instructions on packaging, refer to MSIX Packaging Tool - Create App Package.
- Ensure the package includes the
- Sign the MSIX package
- If using local certificates for signing, make sure to install the certificate in the trusted root certification authorities store on your machine.
- Install the signed MSIX package
If you prefer not to compile the app yourself, you can download the precompiled MSIX package and certificate from the Releases section.
-
Download the following files from the Releases section:
- LPPSW.msix (precompiled MSIX package)
- LPPSW.cert (certificate file)
-
Install the certificate:
- Double-click the LPPSW.cert file.
- Choose to install it in the Trusted Root Certification Authorities store.
- Why is this necessary? The certificate verifies the authenticity of the MSIX package. Since this app is not published in the Microsoft Store, it is not automatically trusted by your system, which is why you need to manually install the certificate to ensure the package is recognized as legitimate.
- Warning: Installing a certificate adds trust to the signer. Only install certificates from trusted sources. By installing this certificate, you are trusting that the software provided is legitimate and safe to use.
-
Install the MSIX package:
- After the certificate is installed, double-click the LPPSW.msix file to begin installation.
- If you encounter any security warnings or prompts, ensure that you allow the installation of trusted packages.
- On first install, you will be prompted to choose the default app for the URI scheme: lenovo-companion.
- This behavior will only happen if Lenovo Vantage is installed.
- If you don't see the prompt to choose the default app for
LENOVO-COMPANION, search for "Default Apps" in Windows settings, and set LenovoPlayPause as the default handler.
- Lenovo Keyboard Manager and Lenovo Vantage are required to be installed for the app to work.
- Lenovo Vantage is needed as this app uses the
LENOVO-COMPANIONURI scheme which by default is handled by Lenovo Vantage.