/* * Copyright (C) 2024 Jonni Liljamo * * This file is licensed under GPL-3.0-only, see NOTICE and LICENSE for * more information. */ package types import ( "github.com/charmbracelet/bubbles/key" ) // HostListKeyMap defines key bindings for the host list. type HostListKeyMap struct { Quit key.Binding } // NewHostListKeyMap returns a new HostListKeyMap. func NewHostListKeyMap() *HostListKeyMap { return &HostListKeyMap{ Quit: key.NewBinding( key.WithKeys("q"), key.WithHelp("q", "quit"), ), } } // ActionListKeyMap defines key bindings for the action list. type ActionListKeyMap struct { Back key.Binding CopyCommand key.Binding } // NewActionListKeyMap returns a new ActionListKeyMap. func NewActionListKeyMap() *ActionListKeyMap { return &ActionListKeyMap{ Back: key.NewBinding( key.WithKeys("q"), key.WithHelp("q", "back"), ), CopyCommand: key.NewBinding( key.WithKeys("c"), key.WithHelp("c", "copy cmd"), ), } }