Skip to content

Conversation

@christianfuttrup
Copy link
Contributor

@christianfuttrup christianfuttrup commented Jan 4, 2025

Description

This pull request aims to ensure that the switch cases don't accept a random string from the KeyboardEvent but rather only the ones that we expect. Furthermore, each case in the switch statement doesn't handle preventDefault anymore; it has been moved to all cases that meet the keys we expect.

Type of Change

  • ✨ New snippet
  • 🛠 Improvement to an existing snippet
  • 🐞 Bug fix
  • 📖 Documentation update
  • 🔧 Other (please describe): Slight refactoring to secure better typing to prevent accidentally introduced misbehavior in the future.

Checklist

  • I have tested my code and verified it works as expected.
  • My code follows the style and contribution guidelines of this project.
  • Comments are added where necessary for clarity.
  • Documentation has been updated (if applicable).
  • There are no new warnings or errors from my changes.

Related Issues

#140 (same context)

Copy link
Collaborator

@psychlone77 psychlone77 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍. Thank you for your contribution.

@Mathys-Gasnier Mathys-Gasnier merged commit 55a9225 into quicksnip-dev:main Jan 5, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants