geode-sdk / CustomKeybinds

11 stars 12 forks source link

Modifier Repeat Fix #40

Closed Fleeym closed 6 months ago

Fleeym commented 6 months ago

I noticed JamAttack was complaining about some weird functionality with the undo keybind while using Custom Keybinds in some of his videos. Decided to snoop around a little. Turns out modifier releases weren't being checked properly.

Here's a simple example to check on the latest version:

If reproduced correctly, only the "redo" keybind should be "released", while the "undo" command will remain in a repeat loop, until the editor is exited.

My proposed fix is marking every single keybind that uses the modifier as "released" when releasing the modifier itself. Implementation might be a little ugly, but it works, and I don't think any fancy algorithm is needed for just making some modifier combinations.

TODOs:

[ ] Figure out how MacOS uses "Command" as a modifier and how does it interact with other modifiers

Fleeym commented 6 months ago

I'll just merge this real quick