-
Notifications
You must be signed in to change notification settings - Fork 67
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
Input doesn't distinguish between right and left ctrl/shift #135
Comments
I don't remember exactly, but I think there were some issues with QKeyEvent::nativeScanCode, I did tried to add left/right modifiers and failed. |
After getting familiar with the code, I think you're right. It would be nice to be able to directly reroute inputs to whatever plugin handles them (I guess using QT's nativeEvent handler so that the raw input is passed). I made a quick patch here that fixes this issue for Posix systems. I tested it out and the right ctrl and shift do exactly what I want. I'm sure it can be easily adapted to Windows and iOS (but not more than one at once) using their virtualkeys or scancodes (Windows uses these codes. I think iOS is less uniform, but there's this). |
I was about to post the same issue. The same happens to me. This issue should be given more attention because we are missing an important feature of mupen64plus which allows us to make smaller moves with the analog stick (e.g. for aiming accurately in a game). The feature is described in https://mupen64plus.org/wiki/index.php/KeyboardSetup like this:
I've even tried to unset shift and control keys in the configuration (so they are no assigned to any button) but no difference in the movement in the game. I will try the @zeta12ti's patch but still people with other OS will be missing that feature. |
Thank you @zeta12ti. Your patch works for me. It should be merged into master. |
When hitting either right or left ctrl (or shift), the game takes the input to be left ctrl (or shift) regardless. This is a problem since Mupen64Plus uses right ctrl and right shift to reduce the amount that the arrow keys move the controls (c.f. this guide). If both keys are taken to be the left keys, there's no way to modulate the controls.
It looks like the culprit is Qt's handling of the situation. As you can see in keymap.py, Qt only has Key_Control and Key_Shift, with no way to distinguish right and left. The only solution appears to be using QKeyEvent::nativeScanCode, rather than the built-in codes.
The text was updated successfully, but these errors were encountered: