diff options
Diffstat (limited to 'internal/switcher/keys.go')
-rw-r--r-- | internal/switcher/keys.go | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/internal/switcher/keys.go b/internal/switcher/keys.go index 94eb6fb..e019ba1 100644 --- a/internal/switcher/keys.go +++ b/internal/switcher/keys.go @@ -3,7 +3,7 @@ package switcher import "github.com/charmbracelet/bubbles/key" type keybinds struct { - next, prev, quit key.Binding + next, prev, cpHex, cpRgb, cpHsl, cpCmyk, quit key.Binding } func newKeybinds() keybinds { @@ -16,6 +16,22 @@ func newKeybinds() keybinds { key.WithKeys("shift+tab"), key.WithHelp("shift+tab", "previous picker"), ), + cpHex: key.NewBinding( + key.WithKeys("x"), + key.WithHelp("x", "yank/copy hex value"), + ), + cpRgb: key.NewBinding( + key.WithKeys("r"), + key.WithHelp("r", "yank/copy RGB value"), + ), + cpHsl: key.NewBinding( + key.WithKeys("s"), + key.WithHelp("s", "yank/copy HSL value"), + ), + cpCmyk: key.NewBinding( + key.WithKeys("c"), + key.WithHelp("c", "yank/copy CMYK value"), + ), quit: key.NewBinding( key.WithKeys("q", "ctrl+c"), key.WithHelp("q", "quit"), @@ -25,7 +41,7 @@ func newKeybinds() keybinds { func Keys() []key.Binding { k := newKeybinds() - return []key.Binding{k.next, k.prev} + return []key.Binding{k.next, k.prev, k.cpHex, k.cpRgb, k.cpHsl, k.cpCmyk, k.quit} } func (m Model) AllKeys() []key.Binding { |