Skip to content
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

Add initial cross platform key mapping #2573

Merged
merged 24 commits into from
Jul 3, 2013

Conversation

daniel-dressler
Copy link
Contributor

Requires a version of native with support for key pass through. Use this version of native if ector has not merged my pull request yet: https://github.com/daniel-dressler/native

This pull request adds key mapping support for SDL and maybe Android if the build passes. It provides a new key mapping screen within the settings. It does not tackle analog sticks at present. I am thinking about how best to support analogs but nothing sounds good yet.

Other platforms will be broken if they do not define LEGACY_KEY_MAPPING
See UI/EmuScreen.cpp for where this define is used.

Since this request adds a couple new files and headers could I ask other platform users to test building? If possible I would appreciate pull requests if you can get the other platforms building with these changes. I do not suggest ector merge this request until the other platforms have defined LEGACY_KEY_MAPPING and fixed any build errors.

@daniel-dressler
Copy link
Contributor Author

I have not merged with mainline in a few days so you may have to clone my repo into a new folder for testing.

@adriandennis17
Copy link

I will be testing this out.

Also touch screen analog.. is what i would use. trying to keymap an analog stick, dont think that would work well...

@daniel-dressler
Copy link
Contributor Author

Thank you for mentioning the touch screen inputs, I may have broken those. After work I will take a look.

@adriandennis17
Copy link

Also we need an option, to show the on-screen analog " only " if were gonna use QWERTY keyboard we don't need the on-screen controls to be shown, just the analog,

Also if we untick on-screen controls from the control settings , its not disable its only hidden, and if you should touch somewhere on the screen you can still move around etc...

I think two settings can be implemented:

  1. To disable on-screen touch control.
  2. To hide the on-screen touch control

@daniel-dressler
Copy link
Contributor Author

@hrydgard this should be ready for commit. It should merge clean.

Non-sdl platforms should work by default. SDL itself has the key mapping working.

@adriandennis17 I think those issues are out of my scope. I theory I should get key mapping to the analog stick working. In practice it may take me a few weeks to find a solution I like.

@adriandennis17
Copy link

Ok cool, .....

@hrydgard
Copy link
Owner

hrydgard commented Jul 3, 2013

I don't like how it says "ERROR: Key already used" without saying where it's used, apart from that, it's okay. Merging.

@hrydgard hrydgard merged commit 7704561 into hrydgard:master Jul 3, 2013
@adriandennis17
Copy link

Cant wait to test this out.... this feature should have been

implemented with the first release of v0.8

Device: Droid 3

@daniel-dressler
Copy link
Contributor Author

This gist should help with supporting modern key input for other platforms: https://gist.github.com/daniel-dressler/5924481

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants