Forum moved here!

Home / Shortcut for Insert Text Annotation Under Mouse Cursor [Fixed]

Otavio

Would it be possible to add a shortcut for adding a Text annotation on the current mouse cursor position when reading a PDF file? I’ve looked into the documentation, especifically Keyboard shortcuts, and could not find any shortcuts for this action.

The [a] shortcut automatically adding highlight to a selected portion of text has been a real change for me as I like to add many annotations while reading study textbooks, but adding Text annotations always takes several clicks. Perhaps there are others who might also suffer with this break in reading flow when having to interact with mouse and context menus while reading dense texts.

I saw that there seems to be no shortcuts currently assigned to T, so perhaps this could be a possible shortcut for this?

GitHubRulesOK

I agree there is no quick “shortcut” but there is a key sequence of sorts !!
With your suggested T (the context key is usually to right of spacebar)

ContextUpUprightT [or enter to select T]
[Later edit above works but has now changed see later post]
ContextUT [or enter to select T]

However, you are hovering the target with a mouse to pick your position, so it make sense the “shortcut” is more applicable using right click with a mouse

I had raised this issue [NOW CLOSED as implemented]

Otavio

I see! I’ll start using that key sequence and see if it is quicker than using the mouse. Ideally, I imagined using a T shortcut as a single-click to create the text annotation and open the Annotations window with the text cursor already focusing on the Contents field of the newly added annotation. This way, text annotations would just need the t press, writing the Contents text, and then alt-tab back into the Sumatra reader window to continue reading.

Thank you for answering and raising the issue on Github. I hope it can be implemented in some way!

GitHubRulesOK

Compliments to @kjk
You might now want to update to current pre-release :slight_smile:

ContextUT should be easier

Otavio

I just downloaded and it is indeed a much faster way of doing it compared to before. Thank you!

As an extra question: would there be a way to have a setting for the default color and symbol for new text annotations? I normally end up changing the yellow notes to transparent, but I couldn’t find any options that would allow me to set a default color for new annotations on the SumatraPDF-settings file.

Thanks again for the shortcut inclusion!

GitHubRulesOK

Without testing only the legacy A (highlight) colour can be currently set
(other enhancements such as for text icon may well be in KJK’s to do list)

so for Me A is set high intensity yellow (FF=RR and GG with BB set= 00)
but I could use a script to easily alter highlight (only) to other colours but with so many changes in progress My scripts are on hold :slight_smile:

Annotations [
	HighlightColor = #ffff00
]
kjk

@Otavio Sure, I can add more settings. What should the name be of those settings?

GitHubRulesOK

Keeping it Simple
I am “Guessing” keep it similar to context menu
BUT Text is used for many entries thus TextIconColor = #ff0000
might be clear enough.

Otavio

I agree with this. I imagine that another setting that would allow for a choice of default icon type, like TextIconType = ‘Key’, TextIconType = ‘Paragraph’, should also be relatively straightforward.

If the text icon color were defined by hexadecimal values, would a transparent option be written as #00FFFF00?

GitHubRulesOK

I dont think (but will be proved wrong) that “opacity” (as the programmers prefer to call it) should be mixed in with color as we get problems with main color values thus might be better as a separate TextIconOpacity = #FF

GitHubRulesOK

Note that #00 would be invisible so I dont think its a good value, here I used #20ffff00 which is only just visible as yellow
Also if TextIconType = blank or not a valid Type it defaults to = Note

image

Otavio

This is perfect! Thank you @kjk and @GitHubRulesOK.