-
-
Notifications
You must be signed in to change notification settings - Fork 860
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added keyboard and mouse input remapping, mouse movement to joystick logic, GUI and more #1356
base: main
Are you sure you want to change the base?
Conversation
use relative path for the ini file
and fixed platform-dependent code
Update: |
i have some doubt for mouse . Most games calls sceMouse lib library to do it natively . check draft #633 |
Well for the games that support it just disable this? I wrote this specifically for Bloodborne that doesn't have support, and there, this works fine. I know that this isn't the cleanest option, but for some games you use either this or nothing |
well sure bb what else :D . Need to check how to have both working . Maybe have an config option to enable/disable this |
I checked the libMouse branch, and it looks like it can coexist with this, even without manual config other than not adding mouse bindings to my keyboardInputConfig.ini file like this:
and this is yours:
These can be merged into one, and while I haven't tested this, this will probably work fine, since they use different things, and the overhead of checking mouse input both ways is probably negligible.
|
What are the new controls and how do I change them? I really wanna take the X O Square and Triangle buttons off the Numpad. That would help a lot! |
You can find the new bindings in the user/keyboardInputConfig.ini file, and they are already changed. To use it, just copy it to your user/ directory and you are good to go, and the syntax is fairly straightforward |
Quick notice, as it stands now mouse wheel support is incompatible with Logitech mouse software due to an unknown bug (the wheel inputs don't get registered correctly, the rest work fine) |
I finished the first version of my controller remapping support, but not everything is done yet, here's the current status:
For axis-to-axis mapping, there's a new syntax: axis_left_x = axis_left_x |
…s and buttons The touchpad's button state was correctly handled, so games that use that were fine, but the touchDown flag was always set to true, so games that use this flag had problems, like Gravity Rush
The latest commit should fix Gravity Rush's intro getting stuck after the first input. |
If the game isn't rendering correctly, then inputs not registering us most likely not an issue from this PR, but whatever other error you had. This can be easily tested by checking what happens on main. CUSAXXXXX.ini will always get generated (if it isn't already) when you boot up the selected game. |
Yes, I have seen that already. That is the RPCS3 remapping window modified by @rainmakerv3 for his version of controller remapping. We have already had a short talk about adding a further modified version to this PR, but for that we'd need someone who has a visual Qt editor set up with this project, which I've been unable to do yet on Linux |
I think I can now find some time to edit the UI for your purposes @kalaposfos13 , but I would need to know what the end state functionality would be (are you implementing stick to button remapping, will each side of the axis be mappable, etc). Or maybe it would be simpler if we just list what changes I need to make on my existing UI. For keyboard though it's tricky. we can't use drop-down boxes for inputs (too many choices), and I believe there need to be some new fields for modifiers and half mode for each possible key (maybe a drop down for modifier and a checkbox for halfmode?), as well as sliders for the float values for mouse. So maybe I can do controller first and we'll see about kbm in the future Also for reference @GHU7924 , if you or anyone who's interested on windows you can actually edit this using QT creator without need for any C++ coding knowledge, it's entirely GUI driven |
My idea is that there is 3 tabs: One for the keyboard and mouse, one for the controller and one fallback plaintext editor. I dont know how the keys will be displayed or inputted, and my only idea for that is a drop-down menu (something like the game selector) and you can add/remove entries to/from it, and the entries are just the text of what goes after the "=" sign in the config file (e.g. "lalt, w"). This means that the file parser will have to add each line to a list of inputs to the corresponding output, based on whether the input is KBM or controller (technically it can even be mixed) and saving is just the reverse (maybe add #Keyboard shortcuts and #Controller shortcuts at the beginning of each section). Where currently the "Analog stick settings are, there could be the misc settings like mouse_to_joystick, mouse_movement_controls etc. Let me know if I missed anything. |
We should move this conversation about the new GUI to Discord, as it might be easier there and we don't have to spam this poor PR's comment section even more, as it is already quite long. @GHU7924 do you use Discord? |
So, people. If you have experience in creating a GUI and you are ready to help @kalaposfos13 , then welcome (or find it in the discord). |
I have a functional prototype for GUI (controller only, KBM is a lot more involved) , shown here: The design assumes that each analog direction will be mappable at some point. I can finalize and clean it up when the controller code is finished, but at least this gives an idea of how controller GUI can work with this implementation You can try it here: https://github.com/rainmakerv3/shadPS4/actions/runs/12480051512 |
@kalaposfos13 [CUSA30992] Teenage Mutant Ninja Turtles: Shredder's Revenge (1.08) I tried the Main build and the kbm-only build, but there is no reaction to pressing the buttons of the gamepad and keyboard. If anyone has this game, could you let us know if you have the same problem? |
An updated overview of the PR as of 2 months later, since so much has changed that not a lot remains from the original version:
The current state of input handling
I decided that since more and more games are finally becoming more and more playable, an update to this system is really needed, as a core part of PC gaming is the ability to rebind controls however you want, and a lot of people prefer using KBM over controller.
An overview of the changes
A technical overview of the control flow of the new input handling system
This explanation leaves things like halfmode_joystick and key_toggle handling out, but it is already quite complicated without those.