Skip to content
This repository has been archived by the owner on Jan 27, 2025. It is now read-only.

Commit

Permalink
Reflecting changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Braasileiro committed May 6, 2024
1 parent 2d80e84 commit b0822b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ You know that game that blocks any function of the **WIN** key and only minimize

I came across this problem in [Mega Man Zero/ZX Legacy Collection](https://store.steampowered.com/app/999020/Mega_Man_ZeroZX_Legacy_Collection) recently and discovered that the cause is the [RIDEV_NOHOTKEYS](https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-rawinputdevice) flag that is passed to the device when registering with RawInput. Thanks to [SpecialK](https://github.com/SpecialKO/SpecialK) for showing me this in the logs.

I developed this solution using [Detours](https://github.com/microsoft/Detours) to be injected into the application process. It has a hook in the [RegisterRawInputDevices](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-registerrawinputdevices) function to check if the device being registered has the [RIDEV_NOHOTKEYS](https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-rawinputdevice) flag and, if found, resets it to the default value, which is **0**.
I developed this solution using [Detours](https://github.com/microsoft/Detours) to be injected into the application process. It has a hook in the [RegisterRawInputDevices](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-registerrawinputdevices) function to check if the device being registered has the [RIDEV_NOHOTKEYS](https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-rawinputdevice) flag and, if found, replaces it with **RIDEV_NOLEGACY**. In addition to returning control of the **WIN** key to the user, this flag prevents double input in some applications that use RawInput and LegacyInput together.

# Usage
This program has been designed so that it is **injected** into the application process. You can use any **DLL injector**, here are some examples.
Expand Down

0 comments on commit b0822b7

Please sign in to comment.