Is there a shortcut for creating a child in the outliner?

I do a ton of brainstorming in the outliner. I know I can create a new entry with Ctrl-N or Enter. But is there a keyboard shortcut for creating a child entry? In many editors this is accomplished by hitting the Tab key. But this is obviously not the case with Scrivener.

BTW. I LOVE Scrivener.

You can use CTRL + Right arrow to make a child.

The other arrow keys, when used with CTRL, will move the highlighted section up, down, or left to make it a higher-level piece.

Control + Right Arrow works, but it’s an extra set of keystrokes you have to execute after typing the filename. Not a big deal, but with AutoHotKey (described at the end of this post) you can get around this. I’ve written a simple AutoHotKey script that uses the Control + ; keystroke combination (i.e., hold down control and press the semicolon). It pops up a dialog where you enter the name of the new document, then it creates the new entry in the Binder with the name you just typed and indents it to the right.

What you have to pay attention to is that in Scrivener if your cursor is on an item that has indented items beneath it, then Ctrl+N creates the new item as a child, at the bottom of the hierarchy. That might be what you’re looking for, so if you’re adding a child to an existing hierarchy Scrivener probably does what you want now by using Ctrl+N. But if your cursor is on an item at the bottom of a hierarchy, Ctrl+N does not create a child, it creates a new document at the same level as the one your cursor is on. In that case you’ll want to use the AutoHotKey macro, which will create a new item then indent it to the right, making it a child. The best thing to do, if you want to try it, is experiment with it a little bit.

Here’s the script I wrote:

#IfWinActive, ahk_class QWidget ; only execute if Scrivener is running
^;:: ; this script sets Control + ; to open a dialog where you type the document name, then hits Enter, then Ctrl+Right. In Scrivener this creates a new document indented to the right below the current document.
{InputBox, vfilename, Document Name ; set ctrl+; to pop up input box and get name of new file
Send ^n %vfilename% {Enter} ^{Right}
}
#IfWinActive

If you install AutoHotKey, put this script into a file with a .ahk extension, and double click on this file, it will work for you. If you don’t want to install AutoHotKey but want to try it, I could compile it into an executable and you could run it that way. Let me know if you’d prefer that, but I don’t think there’s any real benefit to it. I’ve made the script specific to Scrivener so Ctrl+; will behave in whatever way it should behave in other applications.

*AutoHotKey is a free, open source tool for generating your own autocorrect entries, hotkeys, macros, etc. that work in any program under windows. You can learn to use it pretty quickly for simple purposes, and if you are inclined to spend the time to learn its deeper features it’s incredibly powerful. I’m not an expert, but I can bang out simple scripts. I use it for all of my autocorrect entries, since they’re then universal - they work in all Windows applications. I also create hotkey scripts with it, for purposes like the one described here for Scrivener. You can find AutoHotKey here:

autohotkey.com/