Skip to content

Conversation

aymanbagabas
Copy link
Member

This commit fixes the key matching logic to accept both the key.Text and key.String representations of keys. This allows for more flexible key matching, especially when dealing with different keyboard layouts or input methods.

Fixes: charmbracelet/bubbletea#1390

This commit fixes the key matching logic to accept both the key.Text and
key.String representations of keys. This allows for more flexible key
matching, especially when dealing with different keyboard layouts or
input methods.

Fixes: charmbracelet/bubbletea#1390
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

@caarlos0
Copy link
Member

worth adding a test maybe?

@meowgorithm
Copy link
Member

@aymanbagabas, is this still needed after charmbracelet/bubbletea#1399? If so, let's close this. If not, let's update accordingly and get this merged.

@aymanbagabas
Copy link
Member Author

@aymanbagabas, is this still needed after charmbracelet/bubbletea#1399? If so, let's close this. If not, let's update accordingly and get this merged.

This would make key.Matches more lenient matching strings and bindings. So after charmbracelet/bubbletea#1399, this is more like a feature rather than a fix.

@aymanbagabas aymanbagabas changed the title fix(key): accept both key.Text and key.String for key matches feat(key): accept both key.Text and key.String for key matches May 9, 2025
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.

3 participants