aboutsummaryrefslogtreecommitdiff
path: root/src/Lazymail/Keymap.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Lazymail/Keymap.hs')
-rw-r--r--src/Lazymail/Keymap.hs16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/Lazymail/Keymap.hs b/src/Lazymail/Keymap.hs
index cdd57cc..9bb2aaa 100644
--- a/src/Lazymail/Keymap.hs
+++ b/src/Lazymail/Keymap.hs
@@ -17,17 +17,29 @@ module Lazymail.Keymap
import UI.NCurses(Event(..), Key(..))
import Lazymail.Types(Keymap, LazymailState(..), Mode(..), LazymailConfig(..))
-import Lazymail.Handlers(advanceMode, previousMode, scrollUp, scrollDown)
+import Lazymail.Handlers( advanceMode, previousMode, scrollUp, scrollDown
+ , toComposeMode, getFrom, getTo, getSubject, getCc
+ , getBcc, getReplyTo, editEmail, sendEmail
+ )
defaultGlobalKeymap = [ ([EventCharacter '\n', EventCharacter ' ', EventSpecialKey KeyRightArrow], advanceMode)
, ([EventCharacter 'q', EventCharacter 'Q'], previousMode)
, ([EventSpecialKey KeyUpArrow, EventCharacter 'k'], scrollUp)
, ([EventSpecialKey KeyDownArrow, EventCharacter 'j'], scrollDown)
+ , ([EventCharacter 'm'], toComposeMode)
]
defaultMaildirKeymap = []
defaultIndexKeymap = []
defaultEmailKeymap = []
-defaultComposeKeymap = []
+defaultComposeKeymap = [ ([EventCharacter 'f'], getFrom)
+ , ([EventCharacter 't'], getTo)
+ , ([EventCharacter 's'], getSubject)
+ , ([EventCharacter 'c'], getCc)
+ , ([EventCharacter 'b'], getBcc)
+ , ([EventCharacter 'r'], getReplyTo)
+ , ([EventCharacter 'e'], editEmail)
+ , ([EventCharacter 'y'], sendEmail)
+ ]
-- | Try to find a keymap for the current mode. If nothing is found, then
-- try looking up in the global keymap.
nihil fit ex nihilo