charmbracelet / bubbles

TUI components for Bubble Tea 🫧
MIT License
5.35k stars 252 forks source link

feat(key): add support for Help callback #501

Open ardnew opened 5 months ago

ardnew commented 5 months ago

This adds support for user-defined help information on key.Binding via callback function. Adding a callback enables more flexibility with displaying help information such as:

The existing API is not changed, and all existing code should continue working as it did prior this change.