sectionForShortcut returns the section for a Shift+letter shortcut, or -1.
(key string)
| 42 | {"C", "Calendar"}, |
| 43 | {"J", "Journal"}, |
| 44 | } |
| 45 | |
| 46 | // sectionForShortcut returns the section for a Shift+letter shortcut, or -1. |
| 47 | func sectionForShortcut(key string) section { |
| 48 | switch key { |
| 49 | case "M": |
| 50 | return sectionMail |
| 51 | case "O": |
| 52 | return sectionContacts |
| 53 | case "C": |
| 54 | return sectionCalendar |
| 55 | case "J": |
| 56 | return sectionJournal |
| 57 | } |