Extension: on Macs, use Google Docs style indent (Cmd+[,]) with Zotero notes bullets

I take a lot of bullet-point notes in Zotero and am constantly indenting/unindenting bullets. At first I used the toolbar button, then discovered that Tab and Shift+Tab do the same.

But I also go back and forth with Google Docs constantly, which uses Cmd+] and Cmd+[ to indent/unindent. And then found myself constantly mixing up the shortcuts between the two. So I wanted to use Google Docs-style Cmd+] and Cmd+[ with Zotero.

Now, on Macs it's easy to remap menu keyboard shortcuts in specific applications using System Preferences. But because Tab and Shift+Tab aren't menu commands, that doesn't work.

But it turns out there's a (free) way to do it. Karabiner-Elements is a powerful key-remapping utility:

https://karabiner-elements.pqrs.org/

Now creating this specific mapping, and applying it only to Zotero and no other apps, is a little tricky. But for anyone who wants, you can follow these steps once you've installed it.

1) Copy the JSON text at the bottom of this comment into a text file and save it as "indent.json" (starting with the opening brace "{")

2) Copy that file "indent.json" to the location ~/.config/karabiner/assets/complex_modifications

3) Open Karabiner-Elements, click the "Complex modifications tab", click "Add rule", and the two rules should appear (called "Map Cmd+[ to Shift+Tab" and "Map Cmd+] to Tab"). Click "Enable" for both of them.

And that's it! You can now use Cmd+] and Cmd+[ to indent/unindent bullet points in Zotero, and it won't affect any applications outside of Zotero.

Hope this proves useful to someone -- and I'd love to see these shortcuts built in to Zotero by default as well. (As well as the Word default ones -- the Cmd/Ctrl+Shift+M shouldn't be confused with anything anyways.)

Cheers

--------------------

{
"title": "Google Docs-style indentation shortcuts for Zotero notes editor",
"rules": [
{
"description": "Map Cmd+[ to Shift+Tab",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "open_bracket",
"modifiers": {
"mandatory": [
"command"
]
}
},
"to": [
{
"key_code": "tab",
"modifiers": [
"left_shift"
]
}
],
"conditions": [
{
"type": "frontmost_application_if",
"bundle_identifiers": [
"^org\\.zotero\\.zotero$"
]
}
]
}
]
},
{
"description": "Map Cmd+] to Tab",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "close_bracket",
"modifiers": {
"mandatory": [
"command"
]
}
},
"to": [
{
"key_code": "tab"
}
],
"conditions": [
{
"type": "frontmost_application_if",
"bundle_identifiers": [
"^org\\.zotero\\.zotero$"
]
}
]
}
]
}
]
}
Sign In or Register to comment.