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

Button keydown-holding functions differently on device vs. web #1272

Open
Sheepy3 opened this issue Nov 29, 2023 · 6 comments
Open

Button keydown-holding functions differently on device vs. web #1272

Sheepy3 opened this issue Nov 29, 2023 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@Sheepy3
Copy link
Contributor

Sheepy3 commented Nov 29, 2023

when you press a button once on the physical console, the console registers that as a single input. On the web, however, holding down a button causes multiple inputs. This should be corrected so that inputs are consistent between the web and spade.

@Sheepy3 Sheepy3 added the feature request New Feature or Request label Nov 29, 2023
@grymmy grymmy added bug Something isn't working and removed feature request New Feature or Request labels Nov 29, 2023
@grymmy
Copy link
Contributor

grymmy commented Nov 29, 2023

@leomcelroy please verify exactly what we want to do here to make things consistent - my $0.02 is that it may be the case that users have tested more on the website, and thus perhaps the behavior there is what should be retained...?

@grymmy grymmy changed the title Button Response parity Button keydown-holding functions differently on device vs. web Nov 29, 2023
@leomcelroy
Copy link
Collaborator

The intended behavior is for button presses to trigger once, not repeatedly.

@leomcelroy leomcelroy assigned grymmy and unassigned leomcelroy Dec 2, 2023
@grymmy grymmy removed their assignment Dec 12, 2023
@Supercolbat
Copy link
Contributor

ROOM makes use of holding down keys on web to move the player, so changing this behavior would make the game unplayable. As a compromise, perhaps there could be an API for changing settings?

setSettings({
  keydownRepeat: true // default: false
});

// or expose a `sprig` or `sprigSettings` next to `api`

sprig.keydownRepeat = true;

Technical note: KeyboardEvent.repeat is not reliable for determining repeated keydown events. This is confirmed by MDN docs.

@leomcelroy
Copy link
Collaborator

Wow that game is amazing.

@DevIos01 DevIos01 self-assigned this Apr 2, 2024
@recursiveforte
Copy link
Member

@DevIos01 are you still interested in working on this?

@DevIos01
Copy link
Member

DevIos01 commented Jun 7, 2024

Hey @recursiveforte feel free to take it if you want, currently stuck on hardware stuff so you can take over this issue :)

@DevIos01 DevIos01 assigned recursiveforte and unassigned DevIos01 Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants