agent-LuluDodo / RebindMyKeys

Allows you to rebind more keybindings. Furthermore, adds an unbind button and allows escape to be rebound!
https://modrinth.com/mod/rebindmykeys
MIT License
0 stars 0 forks source link

3.0 Feature Ideas Collection (ideas are welcome) #4

Open BioTechproject27 opened 5 months ago

BioTechproject27 commented 5 months ago

Yea, that. It's per default F5. Would be cool if I could just leftclick near servers to reload them, instead of having to go to the F5 key :D

agent-LuluDodo commented 5 months ago

Added KeyBind: https://modrinth.com/mod/rebindmykeys/version/2.3

Note that the mod doesn't support mouse buttons :( I'm trying to get them working, but that might take a bit. I will leave this issue open and close it once support for the mouse is available.

agent-LuluDodo commented 5 months ago

Created a new issue (#5) for the mouse support, so I'm going to close this one Thanks for suggesting :)

BioTechproject27 commented 5 months ago

Hey so I've got a few more ideas, writing them in here so u can make your own checklist thingy in "issues" if u want:

I think those could be pretty dope additions, but those are bigger projects ofc

agent-LuluDodo commented 5 months ago

Thank you so much!!!

I will definitely try adding these features. The current version already supports The f3 graphs in 1.20.2+, but it's a bit buggy. And you can rebind f3 (this will also change the f3 + combinations) it's called Debug Menu and in the misc category.

TODO

BioTechproject27 commented 5 months ago

And you can rebind f3 (this will also change the f3 + combinations)

Yeah, in the 2nd bullet point I meant those combinations specifically. that they are seperated from the debug menu key. E.g. having the ability to rebind "Show Advanced Tooltips" from being debug key + other key (default F3 + H) to a single key, let's say the number key 9. And, if the "Advanced Settings" idea is also added, then one could even have multiple bindings for one key/key combo. E.g. so that by pressing the R key, Chunk Borders are activated as well as Showing Hitboxes. Or that they are always active when the F3 menu is also open, etc.

agent-LuluDodo commented 5 months ago

If you don't mind, could you please give me some feedback on my layout for the advanced config?

What do you think of this setup? Is there too much going on, or is the layout confusing?

Simple Menu

SimpleKeyBindsScreen

Advanced Menu

Clicking the Advanced button leads to this screen AdvancedKeyBindsScreen1 Clicking on Key Combo leads to this screen AdvancedKeyBindsScreen2 Click on Mode in the Screen from before leads to this screen AdvancedKeyBindsScreen3 (This looks a bit messy, but the implementation will show the unsupported part if I didn't define a default mode for the KeyBind, to hopefully allow support with more mods)

Again thanks @BioTechproject27 :)

BioTechproject27 commented 5 months ago

Hey sorry for the late reply.. Anyway, I'd love to give some input :D

Hmm, maybe it's just habit, but I liked the relatively intuitive implementation of the example mod(s). Because as it is now it kinda has too many seperate screens for what it needs to do.

So if I were to implement this, I would maybe have a little Cog Wheel button infront of every Reset button [exactly the same as the "U" button for unbinding]. This Cog Wheel would display a pop-up, with similar options to the example mods. That means: "Activate On" Press/Release/Both (Should the keybind activate upon pressing the button, releasing or both) "Context" In-Game/GUI/Menu (Can the keybind be activated in GUI's, only when inside a menu [e.g. Game Menu] or only when In Game) "Always Action" Toggle/Activate/Deactivate (basically always only deactivates/activates/toggles keybind [this is entirely my idea, the reason for its implementation is explained in the 3rd section]) "Allow Extra Keys" True/False (wether keybind should activate when additional keys are pressed) "Order Sensitive" True/False (wether to honor the order of keys pressed or not) [Maybe move the Unbind button in here for cleaner Keybind UI?]

(Descriptions should be displayed as hover tooltips to better help ppl understand what is meant and how it works.)

I'd also add a little + button next to the Cog Wheel button for adding multiple keybinds [It would just add a new line which defaults to Unbound and would have its own Cog Wheel. Ofc it should also have a - or x for removing it]. (The idea is that one can have e.g. the Debug Menu pop up as well as showing chunk borders when pressing 9, and can activate the narrator and show chunk borders when pressing 8, while also being able to deactivate the narrator seperately by pressing 7 and be able to deactivate all at once by pressing 6. This is just a wild example, but especially with other mods this becomes very helpful.)

Making and having keybinds that use multiple keys would be exactly the same as the example mods implementation (click on the button field and press the buttons you want).

Ofc the default options should be Vanilla. e.g. for the Debug Menu that means keybind F3 "Activate On" Press "Context" In-Game "Always Action" Toggle "Allow Extra Keys" True "Order Sensitive" True/False (doesn't matter here as it's only one key. Could also maybe just be greyed out.)

As a design for the Cog Wheel pop-up, probably a vanilla container (e.g. barrel) would do with similar dimensions relative to the screen, maybe having an alpha of 90 or so. And also like with many pop-ups, clicking around it would close said pop-up and save the changes. I think the Reset should also reset everything in the Cog Wheel to default.

These are just my ideas and I'd love to hear and discuss other ideas! (also if anything is unclear in what I described pls ask)

agent-LuluDodo commented 5 months ago

Thank you so much for the feedback! I'll make a new design and send it in here once I have some time. You don't have to be sorry. It's you helping me after all :)

agent-LuluDodo commented 5 months ago

new_design_preview Here's a preview of the new design if you're interested :)

Buttons

BioTechproject27 commented 5 months ago

Thank you so much for the feedback! I'll make a new design and send it in here once I have some time. You don't have to be sorry. It's you helping me after all :)

Well, it's not like I'm not getting anything out of this myself. Still ghosting people kinda sucks bcs then they'll always wonder what went wrong xd

Settings: Advanced configuration for the current KeyBinding (custom) [potentially also for extra KeyBindings] Reset: Resets everything for the current KeyBindings, including advanced configuration and extra KeyBindings (custom + vanilla)

So the way it looks right now, the settings button would influence all keybindings for that action. It would be nice to have one for each keybind seperately. The same should then be true for the reset.

I think an improvement would be to have the same buttons for each line in some order, like: X (unbinds if it's the first line; removes whole keybind line if it's secondary or more) + (adds another keybind line) Cogwheel (Settings for this keybind line) Reset (resets keybind & keybind settings in this line to vanilla settings)

This way would let you configure each line and as a bonus it looks clean.

agent-LuluDodo commented 5 months ago

Key Binds Screen

2 0-SimpleKeyBindsScreen I changed the design a bit to make it less crammed. I wasn't sure if I should keep the spacing between the gear and reset button. What should the rebind button next to the extra KeyBindings do? Should it only reset the settings or also set the key to unbound (removing the row would be the same as the remove button)?

Unbind

The Unbind button could be in a right click menu, but I don't think that looks nice after trying it: 2 0-SimpleKeyBindsScreen Right Click I could imagine using the previous method of it showing when rebinding the key, or I could move the + button, but I don't know where I should put it.

Settings

After clicking on the gear this popup opens: 2 0-SimpleKeyBindsScreen Settings The Context is read-only, since it doesn't make sense to be able to change that. I also renamed Always Action to Operation Mode, because I think it fits better.

Key Combination

After clicking on Edit in the Key Combination row, this menu opens: 2 0-SimpleKeyBindsScreen Key Combination empty Should I replace the Edit button in the settings screen with this list? That would reduce the amount of screens to 2. Pressing the Add button opens a dropdown for more options (see next picture). The KeyBinding visible in this picture is the one from the original menu.

A KeyBinding is structured like this:

  1. Edit Button
  2. Remove/Unbind Button
  3. Key this results in

Order Sensitive can be one of two values:

Here is a picture with more going on to explain the last feature: 2 0-SimpleKeyBindsScreen Key Combination

The Add button dropdown shows 3 options:

  1. Key | Adds a normal KeyBindings which is bound to the next key/mouse button you press.
  2. Key Binding | Requires the KeyBinding specified to be active.
  3. Modifier | These can be SHIFT, CTRL, ALT, SUPER (GLFW docs)

If any feature is unclear, or you have more improvements to suggest, I would appreciate that :) Also, please let me know if I should combine the settings and key binding menus.

As always thanks for all your help!

BioTechproject27 commented 5 months ago

I wasn't sure if I should keep the spacing between the gear and reset button.

Hmm, maybe add spacing between Key and all the other buttons instead? I think because Key is so wide you automatically get this crammed look.

What should the rebind button next to the extra KeyBindings do? Should it only reset the settings or also set the key to unbound (removing the row would be the same as the remove button)?

I've got another idea here, I think the Reset button should stay as is and reset everything for that Action to default (preferably with a confirmation screen). Resetting to the default option for each keybind line could be done in the Gear pop-up, maybe with your compact reset button design in the upper right/left corner? It should also only reset the options in the Gear then, as one can simply remove and add a new line if they'd want a full reset by pressing X and +.

On the topic of unbinding keys, the way I see it, unbinding a button only really makes sense when you simply don't want that action ever performed by a key. So unbinding should only be an option for the first (and only) line. I could also be wrong ofc, but I don't see a scenario where one would need an unbound key and have additional keybind lines.

The Context is read-only, since it doesn't make sense to be able to change that.

For Vanilla settings I absolutely agree, mod support can be added later and is a whole different can of chaos for now xD

I also renamed Always Action to Operation Mode, because I think it fits better.

Yep, agree.

Okay, so. In terms of actually binding a key(combo) I'd refer to the example mods (e.g. tweakeroo). Have you played around with the keybinding implementation they have? Highly reccommend checking it out. It's very clean and intuitive and removes the need for its own screen as far as I see. Instead of having Modifiers & Keys, it just treats all of them as Keys.

But I like your idea of checking for active keybinds, I'd move that (and order sensitivity in that case as well) into the Gear if we remove that keybindings screen entirely. Maybe at the bottom of the pop-up (which would probably need to be scrollable) as "Active Keybinds":

Action_1 - Keybind(combination)_1
Action_2 - Keybind(combination)_2

etc. Maybe with a + and X button behind each to add/remove new lines. As I am writing this I again realize I'm just blatantly plagiarizing a feature of tweakeroo & similar mods, specifically the "List" feature lmfao. But hey, it works pretty well. The newly added line (with +) should be empty though in that case and have a dropdown of all available keybindings.

BioTechproject27 commented 5 months ago

The Context is read-only, since it doesn't make sense to be able to change that. For Vanilla settings I absolutely agree, mod support can be added later and is a whole different can of chaos for now xD

After looking at the keybinds there are a few exceptions I thought of. Those would be:

Movement Sneak (could be usable in GUIs & should be able to restrict it in game) Sprint (could be usable in GUIs, makes sense when it's set to toggle & should be able to restrict it in game)

Gameplay Dismount (could be usable in GUIs & should be able to restrict it in game)

Multiplayer List Players (could be usable in GUIs & should be able to restrict it in game)

Miscellaneous Debug Menu & everything attached to it (could be usable in GUIs & should be able to restrict it in game) Narrator (should be able to restrict it) Toggle HUD (could be usable in GUIs & should be able to restrict it in game) Toggle Perspective (could be usable in GUIs & should be able to restrict it in game)

[Technically the other Movement & Gameplay keys could also be usable in GUIs, but I feel like that's cheaty and hack clients already do that.]

agent-LuluDodo commented 5 months ago

Just wanted to give an update. I've got the foundation down, but still need to implement a lot. Since exam period is coming up for me, that might sadly take a while. Thanks for your patience :)

BioTechproject27 commented 5 months ago

Ah, well I was actually gonna ask for an update on how the project's goin' :> No worries, school & jobs come before hobbies! An update would be nice when you continue working on the project. And good luck on your exams! :>

BioTechproject27 commented 3 months ago

Additional idea: Fast succession button pressing & customization

Reasoning: Double tapping jump allows for creative flight. Adding this tapping option would also allow to freely configure this (and could allow for other stuff, like disabling/rebinding double tapping the forward key which activates sprinting as a secondary option and is permanently tied).

BioTechproject27 commented 3 months ago

I browsed through the minecraft wiki, where I found that "F4 Toggles the currently active post-processing shader, such as screen filters when spectating as certain mobs."

This is seperate from the gamemode changer and should also be added for completion. (This is a feature, while only used in vanilla for spectating mobs afaik, is used by other mods like the Origins mod)

agent-LuluDodo commented 3 months ago

That's what F4 does, I saw it in code but pressing f4 didn't do anything, so I just ignored it. Adding it to my ToDo

agent-LuluDodo commented 2 months ago

Managed to make a bit of progress here and there. So here is a little sneak peek of my current progress :) Screenshot 2024-05-10 221925

The main points I still need to do are:

BioTechproject27 commented 2 days ago

Hey, how is it comin' along? c:

Had some other ideas, one which goes kinda in the same direction:

Adding control to other aspects that lack them:

Toggle Auto Jump Toggle Subtitles Decrease/Increase/set specific value Brightness Decrease/Increase/set specific value FOV Decrease/Increase/set specific value Sound Volume Toggle View Bobbing seperating the Debug bound keybinds (like showing chunks, hitboxes, etc) (just mentioned it in case it wasn't on the list yet) and maybe Skin Settings: Toggle Cape Toggle Hat Toggle Jacket Toggle Left Pants Leg Toggle Left Sleeve Toggle Right Pants Leg Toggle Right Sleeve

Another idea would be, if u don't have it already, but a confirmation screen for resetting the keybinds makes sense.

And, another feature from other mods I found which could make sense: profiles/instances/presets for keybinds

And modding for 1.21 makes sense as it's out now, plus, it may be easier with Quilt instead of fabric? At least they should be pretty compatible afaik

Anyway, let me know ur thoughts sometime

agent-LuluDodo commented 23 hours ago

Really thankful for all the suggestions but I'm currently on holidays so give me till Sunday for the reply. :)