Today I discovered the message filtering options available in View > Display -- for example, "Only Unread Messages", "Only Flagged Messages", and others. I had previously set up virtual folders for this purpose, but filtering has advantages: for example, I don't lose my message selection when I toggle between "Only Unread" and "All Messages". But what mystified me is that there seemed to be no way to assign a keyboard shortcut to these filters. (If you right-click the toolbar and choose Customize, then go to the Shortcuts tab, you can browse the Main Menu, but under View > Display there is only "All messages", "Display filter", and "Advanced filtering" -- there are no specific filters like those mentioned above.) I similarly got stuck trying to customize the keyboard shortcuts for the functions under View > View threads by.
After searching this forum for "keyboard shortcuts" and finding almost nothing, I tried to write an AutoHotKey script to get around this. Since this script didn't work at first, I tried again to find the functions in The Bat, and this time I succeeded. I'm so pleased with the result that I'm sharing it here, in case it may be of use to anyone else.
The place I found those missing menu items in the Customize dialog, not in the Shortcuts tab but in the Menu & Toolbars tab, in the Actions column, under All Actions (towards the bottom of that very long list). But how to assign a keyboard shortcut to them? I created a new container in the left column, selected it, then added each of the functions I wanted to customize to this new container, whose contents were now displayed in the right column. I decided also to assign images so I could use this new container as a toolbar, but you could skip this step if you just want to assign keyboard shortcuts.
Then I returned to the Shortcuts tab, found my new container, and under it, the functions. Now I could double-click each one and assign a keyboard shortcut.
A question for the developers remains: Why are some menu functions missing from the Shortcuts tab under Main Menu? But regardless of the reasons for that, those functions (at least the ones I looked for) can have their keyboard shortcuts customized using the method described above.
After searching this forum for "keyboard shortcuts" and finding almost nothing, I tried to write an AutoHotKey script to get around this. Since this script didn't work at first, I tried again to find the functions in The Bat, and this time I succeeded. I'm so pleased with the result that I'm sharing it here, in case it may be of use to anyone else.
The place I found those missing menu items in the Customize dialog, not in the Shortcuts tab but in the Menu & Toolbars tab, in the Actions column, under All Actions (towards the bottom of that very long list). But how to assign a keyboard shortcut to them? I created a new container in the left column, selected it, then added each of the functions I wanted to customize to this new container, whose contents were now displayed in the right column. I decided also to assign images so I could use this new container as a toolbar, but you could skip this step if you just want to assign keyboard shortcuts.
Then I returned to the Shortcuts tab, found my new container, and under it, the functions. Now I could double-click each one and assign a keyboard shortcut.
A question for the developers remains: Why are some menu functions missing from the Shortcuts tab under Main Menu? But regardless of the reasons for that, those functions (at least the ones I looked for) can have their keyboard shortcuts customized using the method described above.