Stereo101 / python-MidiToVirtualPianoMacro

Takes a midi file and converts it into a macro which will play the midi using virtualpiano.net. Uses pyHook and ctypes for macro execution.
96 stars 82 forks source link

key pressed not able to be registered on games #17

Closed ronellj closed 3 years ago

ronellj commented 3 years ago

Some games that are not ran from a web-based platform, like Garry's mod, the keys pressed is not registering thus not allowing the program to play.

edit: The keystrokes pressed does do actions on the game and even types in the chat, but when it comes to the piano itself, no sound nor keystroke is produced. Garry's Mod Addon: https://steamcommunity.com/sharedfiles/filedetails/?id=104548572

Stereo101 commented 3 years ago

Games often read user input in a less generalized way than a browser would for the sake of performance / reducing input lag. Getting key presses to register on a given game engine may require hooking the game or other case by case methods. Still, if anybody knows a simple and non-intrusive way to get key presses recognized in GMod/Source I'd be happy to add it in.

Stereo101 commented 3 years ago

Same as #6