Modified Gmail Macros v. 2.0

By sewpafly Last update Oct 22, 2008 — Installed 11,688 times.

Script Summary: Extra (customizable) keyboard shortcuts and macros for Gmail 2.0. Based on the work of Mihai @ persistent.info.



For comments/questions/requests for help.
  • See 'h' for list of macros available.
  • If your configured keys ever get hosed, you can always go to about:config and reset the "macros" and "selectors" greasemonkey values. I don't think that this should be a problem, it's pretty stable.
  • Use keys to navigate the help screen: up/down to change sections, right enters macro section. Use tab to get to next macro, etc.
Case sensitive keys (overrides any gmail shortcuts using that key).
'g' --> 'go to label/quick link'
'l' --> 'apply label'
'L' --> 'remove label'
'N' --> 'create and apply label'
'E' --> 'Mark as read and archive'
'f' --> 'focus: loads all inbox/unread/starred messages 
         in the current label or search'
'i' --> 'move selected messages to inbox'
'T' --> 'Mark as read and move to trash'
'O' --> 'Open all conversations in the current thread
',' --> 'Mark as read, all unread'
'q' --> 'Add quick link'
---
't' --> 'Trash'
'r' --> 'Mark as read'
'R' --> 'Mark as unread'
'e' --> 'archive'
'X' --> 'Select'
    'a' --> 'all'
    'n' --> 'none'
    'r' --> 'read'
    'u' --> 'unread'
    's' --> 'starred'
    't' --> 'unstarred'

Troubleshooting

Gmail & greasemonkey (or firefox extensions) have an interesting relationship. If you reload gmail you'll probably have problems unless you clear your cache first. If you seem to be having problems:
  1. close gmail window/tab
  2. Clear cache (ctrl-shift-delete)
  3. Reload gmail

Tips & Tricks

  • 'Z' enables debugging: output is to the console (Tools-> Error Console)
  • The ignore option can be used to shift into gmail mode. Add an ignore shortcut then after pressing this key, whatever you press will pass through to gmail. Be careful, the ignore key is not trapped (meaning that you can ignore the next key after performing a macro, or if the ignore key is a gmail shortcut, gmail will do something.

Version History

20081021.1:
* Label spaces bug.
* GMAIL CHANGE: Selectors activate on click instead of mousedown.
* Merged submitted patches for webkit user scripts.
20080724.1:
* Modified isQuickLink
* No longer traps keyboard commands on <input /> elements.
20080714.1:
* Shortened Labels now show full path information.
* Reworked the update code.
20080617.1:
* Gmail labs keyboard shortcuts disappear :(
20080611.1:
* Updated for Gmail Labs integration.  Deprecated features 
  that can be changed through gmail's keyboard shortcuts.
* Support for quick links: 'g' will goto a quick link and 
  'q' adds quick link.
20080603.1:
* Fix for RTM
* Fix for GTDInbox and other label issues
* Fixed some keys not trapping keypresses
20080214.1: New labels fix was weak and needed to be redone.
20080127.1: Fixed for recent gmail changes (go to, label). Removed dependencies from Folders4Gmail (if you have labels with '/' or '\' in them they are accessed by what comes after the '/' or '\'. Might cause problems from labels with identical sub-structure. I'd be interested to know if anyone is actually impacted by this. Bug with new labels running macros fixed. Fixed bug caused by recent greasemonkey security update.
20080124.1: Bug with help display, bug with g+"Starred".
20080114.1: Added help keyboard shortcuts (up/down to move between sections and right arrow to start modifying macros -- then tab as normal). A bit clunky, but it works.
20071206.1: Added Folders4Gmail support, auto-update code and some minor bug fixes.