Searching for a key could be better
hvdklauw opened this issue ยท 5 comments
It has been a gripe of mine for a while, but often the B key is used for multiple bindings and I have to fix that, but searching forkey:B or key:"B" gives everything containing B, like mouse buttons and Not Bound especially the last one is really annoying in big modpacks.
I think two changes would fix this:
- key searches should automatically exclude all the unbound things
- using
key:"B"should be exact matching only, so no matching backspace, mouse buttons, tab
For the last one I'm on the fence for including Ctrl+B, Shift+B etc, I think it's ok to include those, but maybe you want true exact matching so if you want to search for that it should be key:"CTRL+B"
key searches should automatically exclude all the unbound things
I'm inclined to agree with this, but I would like to sit and think on it a bit more, I can't really see a usecase to show unbound keys right now, but if I am removing information from a search, I want to make sure it shouldn't affect anyone.
The latest version for 1.21.8 no longer shows unbound keys when using the "key" filter.
I'm going to keep this issue open for now, incase anyone has any comments about it, or other ways to improve the search experience
Ok, I can see that.
Maybe then make the Show Unbound button actually include/exclude/exclusive showing unbound actions... it's mostly the Unbound that makes the list very long.
Unfortunately I feel that no matter how the system is implemented, someone is always going to have an issue with it, even in your own issue you are conflicted if key:"B" should return modifier keybinds as well.
I personally like how it is now, if I want to find everything bound to a shift key, I don't want to have to type key:"left shift" and then another key:"right shift" search. It also lets me search for all keys that have a modifier (I should probably turn that into a modifier:shift search filter at some point) showing more keys is better then showing fewer keys imo.
key searches should automatically exclude all the unbound things
I'm inclined to agree with this, but I would like to sit and think on it a bit more, I can't really see a usecase to show unbound keys right now, but if I am removing information from a search, I want to make sure it shouldn't affect anyone.
using key:"B" should be exact matching only, so no matching backspace, mouse buttons, tab
quoted searches (key:"a" | key:'a' | key:`a`) are a thing to deal with multi-word values, such as key:'Left Button', key:'Right Shift' and category:"Creative Mode", if I used quotes to match exact, you would not be able to search for things, for example searching for name:"hotbar slot" gives you all the hotbar slots, with your suggested change, it would return nothing.
It is possible in the future I can add something along the lines of:
// Current default
key:B filter:contains
// match the key exactly
key:B filter:exact
// match the key if it starts with the letter
key:B filter:starts_with
// match the key if it ends with the letter
key:B filter:ends_with
// etc
// or potentially this.
key:starts_with:B
key:equals:B
which should solve your issue, however this would require breaking API changes and a redesign of a the filtering system, which I do not have the time to do right now, so I'm going to leave this issue open for now.
I would second this. The mod in general is awesome improvement over the standard key binding... but I cringe every time I try to find something bound to the letter 'b', or any letter that is part of the word "Not Bound". Just this one, single change would be a major help. Maybe consider a negative constraint like JEI, say "-Bound" should hide anything with the word "Bound"?
I'd support the addition of a key:equals filter feature. I frequently just want to know "wtf is bound to L".
Knowing you've got a lot of complexity to manage as it is with translations, this probably isn't in the cards as it's just more complexity, but I'll leave this idea here for the sake of it:
A singular textbox approach might be the wrong UI. I think it functions well for filtering Control Names, but less so for keybind filtering. I think 2 additional dropdowns would be optimal ui/ux.
- Modifiers dropdown
- Default value:
Any - Selectable values:
AnyNoneL/R ShiftL/R AltL/R Ctrl
- Default value:
- Key dropdown
- Default value:
Any - Possible Values:
AnyNone(eg, for searching binds to just 'left shift')<Prepopulated list of every possible 'base' key>
- Default value: