I would like to request the ability to assign Highlighter Colors to a HotKey. I realize that there is the button that opens the whole set, and the drop-down list in the right-context menu that can be used.
I am not suggesting they must be added as Hotkeys when the program is shipped, only available to be placed onto hotkeys via the Shortcuts setup feature, or something like that. And being able to assign shortcuts to the list shown in the right-click context menu would be fine.
Then I could decide if I need/want to dedicate keys to highlights (which I really do!) and can select whatever key combinations that work for me.
Yes — you didn’t mention in your original post which version you’re on and it only occurred to me after I’d posted that you might be on windows…
Unfortunately, Windows as an OS lacks some features which come as standard on the Mac, and it must be difficult for the programmers to replace them all in house (or for me to remember which features don’t make the cut ) Hopefully, Scrivener developers will add more shortcuts as time goes on.
Yeah, I’m not knocking anybody. Scrivener deals with highlighting better than any other program I’ve tried (though maybe Word does it better, IDK)… But I use highlighting extensively as a visual aid to remind myself of various things about the text I’ve selected. Orange for revision, red (rose) for delete, yellow for important, probably should revise, blue & green for important (similar to yellow-- I use them typically when sequences / steps matter). And also the CLEAR highlighting. If nothing else, I could live if just orange and clear were on hotkeys
Here 's an Autohotkey script that would do what you want.
Ctrl+Shift+1 highlights text in Cantaloupe.
Ctrl+Shift+2 highlights text in Pink Marker.
The script works by doing Alt+ R, H, arrow down x 3, enter. (Selecting Cantaloupe)
You can assign different hotkeys by tweaking the script, but avoid using Alt as your hotkey. And you can change the color selected by changing the Down count. Of course, you can add more hotkeys and colors.
Let me know if you have any questions about how to set up Autohotkey.
Best,
Jim
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
;--------------------------------------------------------------------------
SetTitleMatchMode, 2
#IfWinActive ahk_class Qt5153QWindowIcon
;--------------------------------------------------------------------------
^+1:: ; Ctrl+Shift+1 = Cantaloupe
Send !r
Send h
Send {Down 3} ; Cantaloupe
Send {Enter}
return
^+2:: ; Ctrl+Shift+2 = Pink Marker
Send !r
Send h
Send {Down 4} ; Pink Marker
Send {Enter}
return
I have AutoHotKey installed-- can you give me a couple of quick tips how to get this script loaded-up and running? I’ve got years of programming experience, but haven’t used AHK yet, apart from installing it.
You can do it easily with character styles. That makes it simple to remove all formatting of a specific color by redefining the style or deleting it. Don’t forget to override those styles in Compile to remove the highlighting (if you don’t want to Compile it).
That does work with compiling and whatnot. But the highlighting is dynamic-- or maybe better, on-demand / as-needed. I set it to flag an issue. I clear it later when the issue is resolved. In between, I have requests to read, and often send out a version of the WIP with the highlighting intact. So the solution to be able to show/disable it in compiling is good. With regular compiling, I can do it with one switch (remove highlighting). But that’s a minor difference, and YOUR solution might actually turn out to be more adroit, given that I could turn on/off styles by style.
The solution Jim suggested, with the AutoHotKey script, is a good workaround. I modified it a little (even from the one I posted) so that CTRL-7 through 9 are Orange, Red, and Green. CTRL-0 is Clear Highlighting. That fit in with the Scrivener shortcut keys and covers 95% of my use cases.
But I still would prefer the highlighting be available to apply via shortcuts within the program. I don’t care if they’re not hooked-up. There is a facility to defining shortcuts to functions. Just stick the Highlight functions in there, and if I care, I’ll figure out how I want to add them. IMO, I would consider that “Job Done”.
I still like your suggestion though. I think it could come in handy for a variety of other things I’d like to be able to do. The biggest one is to be able to turn off the “Goals” section of my way of doing it when I compile.
The clear advantage of my approach is removing all highlighting of a given color in one go in the Editor, not just in Compile. If the “remove all highlighting” switch overrides character styes (I’d have to test that), I think the other method has no advantages at all.