geheur / More-menu-entry-swaps

https://github.com/runelite/plugin-hub#creating-new-plugins
BSD 2-Clause "Simplified" License
7 stars 13 forks source link

Hotkey release is not always handled. #8

Closed Xylot closed 6 months ago

Xylot commented 2 years ago

I encountered this while using Runelite's quick world hopper (CTRL-Shift-(L/R) Arrow). The hotkey action stays in effect without the key pressed after quick hopping if one of the keys bound is CTRL/Shift/Arrow.

Example: Withdraw-1 is set to CTRL. After hopping to the next world (using CTRL-Shift-Right Arrow), the withdraw option is still on withdraw-1 without CTRL pressed. Pressing CTRL again releases/resets it.

Solution: Probably just clearing any hotkey press on-login.

geheur commented 2 years ago

This doesn't seem to have anything to do with hopping worlds but with pressing the following key sequence: ctrl down shift down ctrl up shift up

This is probably something to do with how modifier keys are handled.

Xylot commented 2 years ago

Thank you for the title change, it makes much more sense now. What layer do you believe this issue is sourced from? OS, Runelite, or this project?

Just tested the key sequence you provided it works for me as well (Windows 10). It seems like the arrow keys are soft locking the modifier keys somehow.

geheur commented 2 years ago

I don't need to press the arrow keys at all to make this bug happen, just what I wrote. If I world hop with [ctrl down, shift down, rightarrow down, rightarrow up, shift up, ctrl up], I don't get this bug so I don't think it has anything to do with arrow keys.

I think the issue is my plugin doesn't recognize ctrl up with shift held down as ctrl up.

m00fin commented 2 years ago

Just wanted to add that this issue occurs in a number of other situations in my experience, as well as in other plugins that accept keybind assignments. I haven't really been taking note of exactly when so unfortunately cannot provide exact details.

Also:

I will begin taking better notice of these issues and begin giving more detailed reports and dig through the client source if I have the time as it may be more appropriate to report them there as this seems to be an issue in other plugins as well.

geheur commented 6 months ago

This has been fixed in core runelite and will be in the next release.