SetKey sets the shortcut of the button from the given [keymap.Functions].
(kf keymap.Functions)
| 282 | |
| 283 | // SetKey sets the shortcut of the button from the given [keymap.Functions]. |
| 284 | func (bt *Button) SetKey(kf keymap.Functions) *Button { |
| 285 | bt.SetShortcut(kf.Chord()) |
| 286 | return bt |
| 287 | } |
| 288 | |
| 289 | // Label returns the text of the button if it is set; otherwise it returns the name. |
| 290 | func (bt *Button) Label() string { |