climbridecode / herblore-recipes

RuneLite plugin that will show which recipes an item is an ingredient for. (moved)
BSD 2-Clause "Simplified" License
0 stars 3 forks source link

Tooltip keybind not working with shift #14

Closed Glisch closed 1 year ago

Glisch commented 1 year ago

When setting the tooltip to shift, it does not trigger the tooltip to appear. I have tried turning the plugin on and off, uninstalling and reinstalling, closing and reopening runelite, reinstalling runelite. Also does not work via either left or right shift. The keybind tooltip does work when I set it to characters other than shift (tried several random keys) or when I set it to be always on (no keybind used). I can verify that the shift key on the keyboard does work in general.

This worked up until a few days ago. I've tried going through plugins to see if another might be interfering with it, but didn't find anything.

climbridecode commented 1 year ago

Thanks for opening the issue. I'll take a look today and hopefully get a fix out!

climbridecode commented 1 year ago

The issue for this is RuneLite doesn't consider Alt and Shift keys as "action" keys, as they're reserved for game-level or lower client-level features such as shift to drop and Alt to move overlays around.

Glisch commented 1 year ago

The issue for this is RuneLite doesn't consider Alt and Shift keys as "action" keys, as they're reserved for game-level or lower client-level features such as shift to drop and Alt to move overlays around.

Just for clarity, I guess this is a recent change? Using shift worked (since I first installed this plugin I dont even know how long ago). It just stopped working in the past week or so (don't know the exact time, but very recent).

I will update to a different keybind, just unfortunate

EDIT: Also, thanks for your work on the plugin. It's much appreciated

climbridecode commented 1 year ago

No worries, and I did recently do a refactor that must've caused this issue. I'm gonna look at what I did differently in the past hehe

climbridecode commented 1 year ago

Though I did merge the refactor in two weeks ago now. I don't see any major differences in how I did it previously vs how it's being done now.. But I'll continue investigating. I wonder if there was a change in how RuneLite treats a "Shift" and "Alt" keybind because the function from the Config interface that returns the bound key is always returning the default Keybind.NOT_SET when Shift is the keybind (code), but when other keys are set (like A or B) it returns a proper keyCode.

climbridecode commented 1 year ago

Good news! I fixed the issue. Going to commit a fix into this repo and open a PR in the plugin-hub :). It was indeed a bug I introduced in my refactor.

If you're interested: https://github.com/climbridecode/herblore-recipes/commit/3138534bf7d1b9418965f406cc4841907a76a140

PR: https://github.com/runelite/plugin-hub/pull/4467

Glisch commented 1 year ago

Awesome, thanks so much for the work on this!