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 Input.is_physical_key_pressed method. #55251

Merged
merged 1 commit into from
Nov 23, 2021

Conversation

bruvzg
Copy link
Member

@bruvzg bruvzg commented Nov 23, 2021

Adds Input.is_key_pressed() equivalent for physical key codes.

Fixes #55244

@bruvzg bruvzg added enhancement topic:input cherrypick:3.x Considered for cherry-picking into a future 3.x release labels Nov 23, 2021
@bruvzg bruvzg added this to the 4.0 milestone Nov 23, 2021
@bruvzg bruvzg requested review from a team as code owners November 23, 2021 09:15
@akien-mga akien-mga merged commit a8c305a into godotengine:master Nov 23, 2021
@akien-mga
Copy link
Member

Thanks!

@bruvzg bruvzg deleted the is_physical_key_pressed branch November 23, 2021 11:35
@akien-mga
Copy link
Member

Cherry-picked for 3.5.

@akien-mga akien-mga removed the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Nov 25, 2021
@akien-mga
Copy link
Member

Cherry-picked for 3.4.1.

@jitspoe
Copy link
Contributor

jitspoe commented Nov 30, 2021

Thanks for adding this! Now we just need a way to properly display the input for key prompts and stuff using physical scancodes: godotengine/godot-proposals#3571

@bruvzg
Copy link
Member Author

bruvzg commented Nov 30, 2021

key prompts and stuff using physical scancodes

There's keyboard_get_keycode_from_physical function to convert physical keycode to the normal keycode, see #52684. But currently it's in the master only (should not be too hard to backport).

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

Successfully merging this pull request may close these issues.

Input.is_key_pressed does not work with physical_scancode.
3 participants