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

Handle Numpad Enter key as regular Enter key #2305

Merged
merged 12 commits into from
Sep 25, 2023

Conversation

neolight1010
Copy link
Contributor

This PR fixes #1959. The key-pressing checks of each editor mode were modified to treat the Numpad Enter key and the regular Enter key as equal. Specifically, the Numpad Enter key now works for the following:

  • Code editor (newline, goto, find, etc.)
  • Music editor.
  • Regular menu.
  • Surf menu.
  • Going full screen with Alt+Enter.
  • Runnning the current cart with Ctrl+Enter.

@joshgoebel
Copy link
Collaborator

Surely we can find a way to avoid repeating the enterWasPressed function over and over in every file?

@neolight1010
Copy link
Contributor Author

Certainly @joshgoebel , thanks for the suggestion. I created the shared enterWasPressed function that uses the hold and period values used in studio.h, and the tic_core_enterp function that receives the hold and period values as arguments, similar to the interface of tic_api_keyp.

src/api.h Outdated Show resolved Hide resolved
src/core/io.c Outdated Show resolved Hide resolved
@nesbox nesbox merged commit 9ed1529 into nesbox:main Sep 25, 2023
31 checks passed
@neolight1010 neolight1010 deleted the numpad-enter branch September 26, 2023 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Numpad enter doesnt work
3 participants