File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ type appModel struct {
5959// KeyMap defines global key bindings
6060type KeyMap struct {
6161 Quit key.Binding
62+ Suspend key.Binding
6263 CommandPalette key.Binding
6364 ToggleYolo key.Binding
6465 ToggleHideToolResults key.Binding
@@ -75,6 +76,10 @@ func DefaultKeyMap() KeyMap {
7576 key .WithKeys ("ctrl+c" ),
7677 key .WithHelp ("Ctrl+c" , "quit" ),
7778 ),
79+ Suspend : key .NewBinding (
80+ key .WithKeys ("ctrl+z" ),
81+ key .WithHelp ("Ctrl+z" , "suspend" ),
82+ ),
7883 CommandPalette : key .NewBinding (
7984 key .WithKeys ("ctrl+p" ),
8085 key .WithHelp ("Ctrl+p" , "commands" ),
@@ -583,6 +588,9 @@ func (a *appModel) handleKeyPressMsg(msg tea.KeyPressMsg) (tea.Model, tea.Cmd) {
583588 Model : dialog .NewExitConfirmationDialog (),
584589 })
585590
591+ case key .Matches (msg , a .keyMap .Suspend ):
592+ return a , tea .Suspend
593+
586594 case key .Matches (msg , a .keyMap .CommandPalette ):
587595 categories := commands .BuildCommandCategories (context .Background (), a .application )
588596 return a , core .CmdHandler (dialog.OpenDialogMsg {
You can’t perform that action at this time.
0 commit comments