# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#
# Key bindings
#
#       maps:
#               alias           alias menu
#               attach          attachment menu
#               browser         directory browser
#               compose         compose menu
#               index           message index
#               pgp             pgp menu
#               postpone        postponed message recall menu
#               generic         generic keymap for all of the above
#               editor          line editor
#               pager           text viewer
#               

# Save to different folder!
macro index P s+RD.Personal\n           "Save to personal folder"
macro pager P s+RD.Personal\n           "Save to personal folder"
macro index D s+RD.Department\n         "Save to department folder"
macro pager D s+RD.Department\n         "Save to department folder"
macro index S s+RD.Statistics\n         "Save to Statistics folder"
macro pager S s+RD.Statistics\n         "Save to Statistics folder"


# Use trash bin
macro index d s+Trash\n         "Save to trash bin"
macro pager d s+Trash\n         "Save to trash bin"
# The following is supposed to be working! :-(
# I have to use ^? for del key.
#macro index <delete> s+Trash\n         "Save to trash bin"
#macro pager <delete> s+Trash\n         "Save to trash bin"
macro index "\C?" s+Trash\n             "Save to trash bin"
macro pager "\C?" s+Trash\n             "Save to trash bin"

# Go back to inbox
macro index "I" "c!\n/~N\n\r"           "Change to inbox"
macro pager "I" "c!\n/~N\n\r"           "Change to inbox"
# Jump to different folder
macro index "\CN" "c\n/~N\n\r"          "Change to mailbox with new email"
macro pager "\CN" "c\n/~N\n\r"          "Change to mailbox with new email"
macro index "\CS" "c=RD.Statistics\n\r" "Change to Statistics folder"
macro pager "\CS" "c=RD.Statistics\n\r" "Change to Statistics folder"

# right key behavior
bind    browser <right> select-entry
bind    index   <right> display-message
bind    pager   <right> view-attachments
bind    attach  <right> view-attach

# left key bahavior
bind    attach  <left>  exit
bind    pager   <left>  exit
macro   index   <left>  "c?"            "Browse mailfolders"

# Select all
macro   index   "\Ca"           "T.\n"  "Select all messages"
# Mark read
macro   index   "\Cr"           "T~N\nN\Ct.\n"  "Mark as read"

# Urlview
macro index \cb |urlview\n      # simulate the old browse-url function
macro pager \cb |urlview\n