keys: indent key definition includes
[sheet.git] / mutt.inc.pl
index 426e417d071a9cda64e4b842280aa1c34ae46676..adc299f5dbd0b9fc07839be80ac2a9f1a45837cc 100644 (file)
 use utf8;
 
-my @generic = qw(^l ! * / : ; < = > ? H L M Z [ ] j k n q t z);
+my %common = (
+       "\e"=> 'g9 mode',
 
-'' => {
-       desc => 'index',
+       'H' => 'g2', # top-page
+       'j' => 'g2', # next-entry, next-undeleted
+       'k' => 'g2', # previous-entry, previous-undeleted
+       'L' => 'g2', # bottom-page
+       '^l'=> 'g1', # refresh
+       'M' => 'g2', # middle-page
+       '^m'=> 'g6 mode^m', # select-entry, display-message
+       'n' => 'g3', # search-next
+       'q' => 'g8 mode', # exit
+       't' => 'g4', # tag-entry
+       'z' => 'g2', # next-page
+       'Z' => 'g2', # previous-page
 
-       ';' => ["apply to tagged", 'arg'], # tag-prefix
-       '@' => ["display sender", 'ci'], # display-address
-       ':' => ["enter command"], # enter-command
-       '=' => ["first entry"], # first-entry
-       ']' => ["half page down"], # half-down
-       '[' => ["half page up"], # half-up
-       '?' => ["help"], # help
-       '!' => ["invoke shell"], # shell
-       '*' => ["last message"], # last-entry
-       '>' => ["line $sign{down}"], # next-line
-       '<' => ["line $sign{up}"], # previous-line
-       '.' => ["list new mail"], # buffy-list #TODO
-       '|' => ["pipe to shell"], # pipe-message
-       '$' => ["save mailbox"], # sync-mailbox
-       '/' => ["search"], # search
-       '#' => ["split up thread"], # break-thread
-       '&' => ["thread tagged"], # link-threads
-       '%' => ["toggle readonly"], # toggle-write
-       ' ' => '^m',
+       '*' => 'g2', # last-entry
+       '=' => 'g2', # first-entry
+       ':' => 'g6', # enter-command
+       ';' => 'g6 arg', # tag-prefix
+       '>' => 'g2', # next-line
+       '<' => 'g2', # previous-line
+       ']' => 'g2', # half-down
+       '[' => 'g2', # half-up
+       '?' => 'g1', # help
+       '!' => 'g1 arg', # shell
+       '/' => 'g3 arg mode/~', # search
+       '+/'=> 'g3 arg mode/~', # search
+);
 
-       'a' => ["create alias"], # create-alias
-       'b' => ["bounce"], # bounce-message
-       '^b'=> ["url$sign{_}view"],
-       '\b'=> ["search bodies"], # M <search>~b
-       'c' => ["open folder"], # change-folder
-       'C' => ["copy message"], # copy-message
-       '\c'=> ["open readonly"], # change-folder-readonly
-       '\C'=> ["make plain copy"], # decode-copy
-       'd' => ["delete"], # delete-message
-       'D' => ["delete pattern"], # delete-pattern
-       '^d'=> ["delete thread"], # delete-thread
-       '\d'=> ["delete subthread"], # delete-subthread
-       'e' => ["edit"], # edit
-       '^e'=> ["edit con$sign{_}tent type"], # edit-type
-       '\e'=> ["edit+send copy"], # resend-message
-       'f' => ["forward"], # forward-message
-       'F' => ["toggle important"], # flag-message
-       '^f'=> ["forget pass$sign{_}phras$sign{_}e"], # forget-passphrase
-       'g' => ["reply to all", '', 'Group reply'], # group-reply
-       'G' => ["fetch POP", '', 'Gather new mail'], # fetch-mail
-       'h' => ["toggle headers"], # display-toggle-weed
-       'H' => ["screen top"], # top-page
-       '^i'=> ["next unread msg"], # next-new-then-unread
-#      '\tab'=> ["previous unread msg"], # previous-new-then-unread
-       'j' => ["next entry"], # next-entry, next-undeleted
-       'J' => ["next message"], # next-entry
-       'k' => ["previous entry"], # previous-entry, previous-undeleted
-       'K' => ["previous message"], # previous-entry
-       '^k'=> ["extract pub keys"], # extract-keys
-       '\k'=> ["send public key"], # mail-key
-       'l' => ["limit pattern"], # limit
-       'L' => ["reply to list"], # list-reply
-       '^l'=> ["redraw"], # refresh
-       '\l'=> ["show current limit"], # show-limit
-       'm' => ["compose mail"], # mail
-       'M' => ["screen middle"], # middle-page
-       '^m'=> ["select"], # select-entry, display-message
-       'n' => ["search next"], # search-next
-       'N' => ["toggle new"], # toggle-new
-       '^n'=> ["next thread"], # next-thread
-       '\n'=> ["next subthread"], # next-subthread
-       'o' => ["sort"], # sort-mailbox
-       'O' => ["sort reverse"], # sort-reverse
-       'p' => ["print"], # print-message
-       'P' => ["to parent"], # parent-message
-       '^p'=> ["previous thread"], # previous-thread
-       '\p'=> ["previous subthread"], # previous-subthread
-       '\P'=> ["check for pgp"], # check-traditional-pgp
-       'q' => ["exit or quit"], # exit, quit
-       'Q' => ["query for addresses"], # query #TODO
-       'r' => ["reply to sender"], # reply
-       'R' => ["recall postpon$sign{_}e$sign{_}d"], # recall-message
-       '^r'=> ["mark thread read"], # read-thread
-       '\r'=> ["mark sub$sign{_}thread r$sign{_}ead"], # read-subthread
-       's' => ["move"], # save-message
-       '\s'=> ["save and delete"], # decode-save
-       't' => ["tag"], # tag-entry
-       'T' => ["tag pattern"], # tag-pattern
-       '^t'=> ["untag pattern"], # untag-pattern
-       '\t'=> ["tag thread"], # tag-thread
-       'u' => ["undo delete"], # undelete-message
-       'U' => ["undelete pattern"], # undelete-pattern
-       '^u'=> ["undelete thread"], # undelete-pattern
-       '\u'=> ["undelete subthread"], # undelete-subthread
-       'v' => ["attach$sign{_}ments"], # view-attachments
-       'V' => ["version"], # show-version
-       '\v'=> ["(un)collapse thread"], # collapse-thread
-       '\V'=> ["(un)collapse threads"], # collapse-all
-       'w' => ["set flag", 'arg'], # set-flag
-       'W' => ["clear flag", 'arg'], # clear-flag
-       'x' => ["exit menu"], # exit
-       'y' => ["list incoming mailboxes"], # M <change-folder>?<toggle-mailboxes>
-       'z' => ["page $sign{down}"], # next-page
-       'Z' => ["page $sign{up}"], # previous-page
-}, # index
+{
 
-' ' => {
-       'L' => ["screen bottom"], # bottom-page
-}, # general
+       '' => {
+               %common,
 
+               '@' => 'g1', # display-address
+               '.' => 'g8', # buffy-list #TODO
+               '|' => 'g6', # pipe-message
+               '$' => 'g4', # sync-mailbox
+               '#' => 'g4', # break-thread
+               '&' => 'g4', # link-threads
+               '%' => 'g4', # toggle-write
+               ' ' => '=^m',
+
+               'a' => 'g6', # create-alias
+               'b' => 'g7', # bounce-message
+               '^b'=> 'g1',
+               '+b'=> undef, # M <search>~b
+               'c' => 'g8', # change-folder
+               'C' => 'g6', # copy-message
+               '+c'=> 'g8', # change-folder-readonly
+               '+C'=> undef, # decode-copy
+               'd' => 'g4', # delete-message
+               'D' => 'g4 arg', # delete-pattern
+               '^d'=> 'g4', # delete-thread
+               '+d'=> 'g4', # delete-subthread
+               'e' => 'g4 linkvi', # edit
+               '^e'=> 'g4', # edit-type
+               '+e'=> undef, # resend-message
+               'f' => 'g7 modem', # forward-message
+               'F' => 'g4', # flag-message
+               '^f'=> 'g6', # forget-passphrase
+               'g' => 'g7 modem', # group-reply
+               'G' => 'g6', # fetch-mail
+               'h' => 'g9', # display-toggle-weed
+               '^i'=> 'g3', # next-new-then-unread
+               '+^i'=> undef, # previous-new-then-unread
+               'j' => 'g2', # next-undeleted
+               'k' => 'g2', # previous-undeleted
+               'J' => 'g3', # next-entry
+               'K' => 'g3', # previous-entry
+               '^k'=> 'g1', # extract-keys
+               '+k'=> 'g7 modem', # mail-key
+               'l' => 'g9', # limit
+               'L' => 'g7 modem', # list-reply
+               '+l'=> 'g1', # show-limit
+               'm' => 'g7 modem', # mail
+               'N' => 'g4', # toggle-new
+               '^n'=> 'g3', # next-thread
+               '+n'=> 'g3', # next-subthread
+               'o' => 'g9 modeo', # sort-mailbox
+               'O' => 'g9 modeo', # sort-reverse
+               'p' => 'g1', # print-message
+               'P' => 'g3', # parent-message
+               '^p'=> 'g3', # previous-thread
+               '+p'=> 'g3', # previous-subthread
+               '+P'=> undef, # check-traditional-pgp
+               'q' => 'g8', # quit
+               'Q' => 'g1 arg', # query
+               'r' => 'g7 modem', # reply
+               'R' => 'g7 modem', # recall-message
+               '^r'=> 'g4', # read-thread
+               '+r'=> 'g4', # read-subthread
+               's' => 'g4', # save-message
+               '+s'=> 'g4', # decode-save
+               'T' => 'g4 arg', # tag-pattern
+               '^t'=> 'g4', # untag-pattern
+               '+t'=> 'g4', # tag-thread
+               'u' => 'g4', # undelete-message
+               'U' => 'g4 arg', # undelete-pattern
+               '^u'=> 'g4', # undelete-thread
+               '+u'=> 'g4', # undelete-subthread
+               'v' => 'g1', # view-attachments
+               'V' => 'g1', # show-version
+               '+v'=> 'g9', # collapse-thread
+               '+V'=> 'g9', # collapse-all
+               'w' => 'g4 arg modew', # set-flag
+               'W' => 'g4 arg modew', # clear-flag
+               'x' => 'g8', # exit
+               'y' => 'g8', # M <change-folder>?<toggle-mailboxes>
+       }, # index
+
+       'm' => {
+               %common,
+
+               '|' => 'g4',
+               'a' => 'g6',
+               'A' => 'g6',
+               'b' => 'g4',
+               'c' => 'g4',
+               'C' => 'g6',
+               'd' => 'g4',
+               'D' => 'g4',
+               '^d'=> 'g4',
+               'e' => 'g4 linkvi',
+               'E' => 'g4 linkvi',
+               '^e'=> 'g4',
+               'f' => 'g4',
+               '^f'=> 'g6',
+               '+f'=> 'g4',
+               'F' => 'g4',
+               'G' => 'g1',
+               'h' => 'g1',
+               'i' => 'g6',
+               'l' => 'g1',
+               'm' => 'g4',
+               'M' => 'g4',
+               '^m'=> 'g1',
+               'n' => 'g6',
+               'P' => 'g8 mode',
+               'r' => 'g4',
+               'R' => 'g4',
+               's' => 'g4',
+               'S' => 'g4 menumS',
+               't' => 'g4',
+               '^t'=> 'g4',
+               'w' => 'g6',
+               'u' => 'g6',
+               'U' => 'g4',
+               'y' => 'g7',
+       }, # compose
+
+       w => {
+               "\e"=> 'g9 mode',
+               'D' => 'g4',
+               'd' => '=wD',
+               'N' => 'g4',
+               'n' => '=wN',
+               'O' => 'g4',
+               'o' => '=wO',
+               'r' => 'g4',
+               'R' => '=wr',
+               '*' => 'g4',
+               '!' => 'g4',
+       }, # flag
+
+       '/~' => {
+               "\e"=> 'g9 mode',
+               A => 'g3',
+               b => 'g3 arg',
+               B => 'g3 arg',
+               c => 'g3 arg',
+               C => 'g3 arg',
+               d => 'g3 arg',
+               D => 'g3',
+               e => 'g3 arg',
+               E => 'g3',
+               f => 'g3 arg',
+               F => 'g3',
+               g => 'g3',
+               G => 'g3',
+               h => 'g3 arg',
+               H => 'g3 arg',
+               i => 'g3 arg',
+               k => 'g3',
+               L => 'g3 arg',
+               l => 'g3',
+               m => 'g3 arg',
+               n => 'g3 arg',
+               N => 'g3',
+               O => 'g3',
+               p => 'g3',
+               P => 'g3',
+               Q => 'g3',
+               r => 'g3 arg',
+               R => 'g3',
+               s => 'g3',
+               S => 'g3',
+               t => 'g3 arg',
+               T => 'g3',
+               u => 'g3',
+               U => 'g3',
+               v => 'g3',
+               V => 'g3',
+               x => 'g3 arg',
+               X => 'g3 arg',
+               y => 'g3 arg',
+               z => 'g3 arg',
+               '=' => 'g3',
+               '$' => 'g3',
+               '(' => 'g3 arg',
+       }, # search option
+
+}