Commit Graph
12 Commits
Author SHA1 Message Date
Ayman Bagabas 8b901d55ff chore(key): add Matches test 2025-04-23 15:14:12 +02:00
Ayman Bagabas 9d836514cf fix(key): accept both key.Text and key.String for key matches
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: https://github.com/charmbracelet/bubbletea/issues/1390
2025-04-15 16:29:14 +02:00
Ayman Bagabas a93bfef532 feat!: use bubbletea@v2-exp 2024-09-09 14:12:52 -04:00
5428d6ddec feat(key): accept any stringer interface to match keys (#584)
* feat(key): accept any stringer interface to match keys

This allows any `fmt.Stringer` interface to match key bindings. We need
this in the upcoming v2 changes.

* Update key/key.go

Co-authored-by: Christian Rocha <christian@rocha.is>

* Update key/key.go

Co-authored-by: Christian Rocha <christian@rocha.is>

---------

Co-authored-by: Christian Rocha <christian@rocha.is>
2024-08-15 15:01:56 -04:00
Christian Muehlhaeuser 4ae575a4c5 chore: use latest gofmt 2022-09-26 08:13:03 +02:00
kenaandGitHub 9b67fb8724 perf: avoid recomputing the key representation in key.Matches 2022-08-12 16:07:31 -04:00
Hironao OTSUBOandGitHub e49b5573bc fix(key): Unbound keys should be disabled
* fix condition for #188
This is a fix of https://github.com/charmbracelet/bubbles/pull/188
Unbound keys has nil keys and they are not Enabled
2022-07-11 10:45:18 -04:00
Hironao OTSUBOandChristian Rocha d4eeb4f5be fix(key): unbound keys are not enabled 2022-07-06 17:01:28 -07:00
Christian Muehlhaeuser 200f95759b Fix key binding documentation
Fixes #105.
2022-01-24 15:09:43 +01:00
Christian Rocha 8d3cfdf380 key.Matches now accepts multiple binding arguments 2022-01-10 12:32:37 -05:00
Christian Rocha 500d7989e1 Fix keybinding examples 2021-09-01 11:33:41 -04:00
Christian RochaandChristian Muehlhaeuser 0be588365e Add simple helper package for making user-definable keymappings and help bubble 2021-08-23 17:00:29 +02:00