Skip to content

sweenwolf/LenovoPlayPause

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

LenovoPlayPause (Input / F11 Key)

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.

βš™οΈ Flow

  • 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.

LenovoPlayPause.exe URI Forwarding

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.


🎯 What This App Does

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.


🧱 Compilation

  1. Clone the repository
  2. Open the project in Visual Studio
  3. Change the C++ version to ISO C++20
  4. Compile LenovoPlayPause.exe
  5. Package as MSIX β€” required for installation.
  6. 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.
  7. Install the signed MSIX package

πŸ“¦ Installation

Precompiled MSIX and Certificate Installation

If you prefer not to compile the app yourself, you can download the precompiled MSIX package and certificate from the Releases section.

πŸ›  Installation Steps

  1. Download the following files from the Releases section:

    • LPPSW.msix (precompiled MSIX package)
    • LPPSW.cert (certificate file)
  2. 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.
  3. 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.

πŸ“ Important Note About Default App for URI Scheme

  • 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.

⚠️ Important Notes

  • 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-COMPANION URI scheme which by default is handled by Lenovo Vantage.

About

Map the Input key to Play / Pause on Lenovo laptops, with no flashing console window.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages