mkmark / lwin-remapper

map `LWin` to `LWin + F23`

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

left windows key remapper

In short, this program maps the single press of LWin to LWin + F23 while preserving the key as a modifier.

This is a workaround to address microsoft/PowerToys#5571.

When Win is pressed alone, the start menu is activated. By remapping only sequential LWin press and release events to LWin + F23, one can suppress the action and use the key for other purposes, while preserving the key as a modifier. If there is no actions allocated to this combination, this is as good as supressing the single press of the key.

The AHK file shows a pilot test using AutoHotkey, but any LWin combination will trigger LWin + F23 first.

The Python file shows a pilot test using the keyboard lib (mapping LWin to LWin + F12). Due to unknown reasons, this approach may have a chance to miss (fail to catch the keyboard events) under certain circumstances.

The C++ approach does not have aforementioned issues.

notes on using PowerToys Run

To change the activation key combination of PowerToys Run, one can use for example F23 by editing ~\AppData\Local\Microsoft\PowerToys\PowerToys Run\settings.json

    "open_powerlauncher": {
      "win": true,
      "ctrl": false,
      "alt": false,
      "shift": false,
      "code": 134,
      "key": ""
    },

where code 134 is F23, see https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes.

knwon limits

For this to work when a window of admin access is activated (e.g. Task manager), this program must run as administrator (hence PowerToys when applied).

About

map `LWin` to `LWin + F23`

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:C++ 41.9%Language:AutoHotkey 25.7%Language:Python 20.7%Language:Batchfile 11.7%