{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeApplications #-}
module UI.GatherHeaders.Keybindings where
import qualified Graphics.Vty as V
import Types
import UI.Actions
gatherFromKeybindings :: [Keybinding 'Threads 'ComposeFrom]
gatherFromKeybindings =
[ Keybinding (V.EvKey V.KEsc []) (abort `chain'` focus @'Threads @'ListOfThreads `chain` continue)
, Keybinding (V.EvKey (V.KChar 'g') [V.MCtrl]) (abort `chain'` focus @'Threads @'ListOfThreads `chain` continue)
, Keybinding (V.EvKey V.KEnter []) (noop `chain'` focus @'Threads @'ComposeTo `chain` continue)
]
gatherToKeybindings :: [Keybinding 'Threads 'ComposeTo]
gatherToKeybindings =
[ Keybinding (V.EvKey V.KEsc []) (abort `chain'` focus @'Threads @'ListOfThreads `chain` continue)
, Keybinding (V.EvKey (V.KChar 'g') [V.MCtrl]) (abort `chain'` focus @'Threads @'ListOfThreads `chain` continue)
, Keybinding (V.EvKey V.KEnter []) (noop `chain'` focus @'Threads @'ComposeSubject `chain` continue)
]
gatherSubjectKeybindings :: [Keybinding 'Threads 'ComposeSubject]
gatherSubjectKeybindings =
[ Keybinding (V.EvKey V.KEsc []) (abort `chain'` focus @'Threads @'ListOfThreads `chain` continue)
, Keybinding (V.EvKey (V.KChar 'g') [V.MCtrl]) (abort `chain'` focus @'Threads @'ListOfThreads `chain` continue)
, Keybinding (V.EvKey V.KEnter []) (noop `chain'` focus @'ComposeView @'ComposeListOfAttachments `chain` invokeEditor)
]