diff options
author | Raúl Benencia <rul@kalgan.cc> | 2013-09-09 16:13:53 -0300 |
---|---|---|
committer | Raúl Benencia <rul@kalgan.cc> | 2013-09-09 16:13:53 -0300 |
commit | d5c39015fb75662f5ae572aa04cdf20d5b8baac7 (patch) | |
tree | 1e4db9af341a1565c241fb380467bdfd00b6c775 /src/Lazymail/Keymap.hs | |
parent | 41b16df2db3920b59d1c13a468e848e68111058b (diff) |
Compose mode
Diffstat (limited to 'src/Lazymail/Keymap.hs')
-rw-r--r-- | src/Lazymail/Keymap.hs | 16 |
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. |