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

fix(keys): spacebar now sends a KeySpace #289

Merged
merged 5 commits into from
Apr 12, 2022
Merged

Conversation

bashbunni
Copy link
Member

@bashbunni bashbunni commented Apr 11, 2022

This fixes a bug where the spacebar would send a Key with type KeyRunes instead of KeySpace. The Runes portion of Key will still contain a space after this fix.

// This is what is sent when you press spacebar now
type Key struct {
    Type: KeySpace,
    Runes: []rune{' '},
}

Changes:

  • remove keySP
  • assign KeySpace to " "
  • update tests to expect " " instead of "space"

I didn't make any changes to readInput.
Manually tested KeySpace in addition to the tests with no issues and KeySpace worked as expected

@meowgorithm meowgorithm changed the title Replace key space fix: KeySpace is effectively unused Apr 12, 2022
@meowgorithm meowgorithm changed the title fix: KeySpace is effectively unused fix: spacebar now sends a KeySpace Apr 12, 2022
@meowgorithm meowgorithm changed the title fix: spacebar now sends a KeySpace fix(keys): spacebar now sends a KeySpace Apr 12, 2022
@meowgorithm
Copy link
Member

Thank you, @bashbunni!

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.

2 participants