Forum moved here!

Home / Keyboard shortcut changed for using highlight feature in recent pre-release versions

jpborher

The feature of highlight a selected text isn’t working with me in the last version of the pre-release version (11040).

The key ‘h’ is associated with another function (change to previous page), and the others hotkeys to highlight in another colors aren’t working too.

If someone can help me, I’ll be so thankfull.

jpborher

That’s the current settings I’m using:

# For documentation, see https://www.sumatrapdfreader.org/settings3.2.html

MainWindowBackground = #80fff200
EscToExit = false
ReuseInstance = false
UseSysColors = false
RestoreSession = true

FixedPageUI [
	TextColor = #000000
	BackgroundColor = #ffffff
	SelectionColor = #f5fc0c
	WindowMargin = 2 4 2 4
	PageSpacing = 4 4
]
EbookUI [
	FontName = Georgia
	FontSize = 12.5
	TextColor = #5f4b32
	BackgroundColor = #fbf0d9
	UseFixedPageUI = false
]
ComicBookUI [
	WindowMargin = 0 0 0 0
	PageSpacing = 4 4
	CbxMangaMode = false
]
ChmUI [
	UseFixedPageUI = false
]
ExternalViewers [
]
PrereleaseSettings [
	TabWidth = 300
]
ShowMenubar = true
ReloadModifiedDocuments = true
FullPathInTitle = true
ZoomLevels = 8.33 12.5 18 25 33.33 50 66.67 75 100 125 150 200 300 400 600 800 1000 1200 1600 2000 2400 3200 4800 6400
ZoomIncrement = 0

PrinterDefaults [
	PrintScale = shrink
]
ForwardSearch [
	HighlightOffset = 0
	HighlightWidth = 15
	HighlightColor = #6581ff
	HighlightPermanent = false
]
AnnotationDefaults [
	HighlightColor = #ffff60
	SaveIntoDocument = false
]
CustomScreenDPI = 0

RememberStatePerDocument = true
UiLanguage = en
ShowToolbar = true
ShowFavorites = false
AssociateSilently = false
CheckForUpdates = true
RememberOpenedFiles = true
EnableTeXEnhancements = false
DefaultDisplayMode = automatic
DefaultZoom = fit page
WindowState = 2
WindowPos = 386 0 593 768
ShowToc = true
SidebarDx = 0
TocDy = 0
ShowStartPage = true
UseTabs = true
GitHubRulesOK

[LATER EDIT] This thread is now locked as the experimental Sumatrapdf Meta eXtension a.k.a. SMX feature has been retired. It is replaced in latest Pre-Releases by newer, more extensive PDF annotations features.

I will repeat comments from previous post here as it seems that heading is not directly related to this issue

You will need the pre-release version for highlight, it is not there in “normal” version since it is classed as experimental I suggest you use a “portable” version for testing https://www.sumatrapdfreader.org/prerelease.html 4

Beware there are two modes in advance settings (save into PDF true or false) I suggest you use false as it will not affect your original, however it does mean you need to keep the document.smx file with the pdf

jpborher

Thanks for the answer.

The github link you’ve shared isn’t working.

I saw all posts about it but what I found is that selecting the text and pressing ‘h’ should highlight the text. However it isn’t working, the ‘h’ key is turning the page out.

[EDIT]

Everything is working well now.

[EDIT 2]

The modifications were pretty good, congratolations for the responsible(s)! I’m just missing the shortcuts those were working on the last versions. I liked so much the changes, it’s pretty neater than later versions.

GitHubRulesOK

Sorry link was changed due to expanding MyNotes overnight from Pre-Release to All versions of SumatraPDF and thus changing title. :blush: I will edit my link above

The change from [H] to [A] will catch many users out but it always was a “secondary” feature thus subject to change.

You said

That suggests you were using nod5 's Helper AHK which needs changing too, a partial solution is linked to as mentioned in MyNotes

jtomorrow1

The prerelease works - 2019-June-10th. I also found out how to create different colors of highlight. In the windows I created new toolbar with 5 different shortcuts that point to
C:\PDFhighlight\Yellow.bat, Green.bat, Blue.bat, etc.

copy C:\PDFhighlight\blue.txt C:\Users\UserName\AppData\Roaming\SumatraPDF\SumatraPDF-settings.txt

Whenever I want to switch colors, I click on each of the color icons that runs the bat file and copies over the Settings.txt and overrides it. Instantly the highlight color changes to the new color.

So the highlightcolor section is the only thing that is different for each color.
AnnotationDefaults [
HighlightColor = #01d2e9
SaveIntoDocument = true

I like to save my colors so when I “save as” it saves the highlights.
I also have my mouse middle button programmed as “H” so it invokes the highlight.

I wish you could create a parameter to change the highlight key in the settings file.

Love the pre-release version .

GitHubRulesOK

In addition to your request which would need to be registered on the list of issues @ https://github.com/sumatrapdfreader/sumatrapdf I suggest you have two other options certainly your idea to replace settings file is good but has a few potential limitations due to the need to flush the current version thus loosing session history.

The two alternatives also have their foibles

  1. Nod5 (at donation coder) wrote a highlight helper which uses AHK to flip the colours for you using keys, however unless he has updated it recently it did/does not work with new A hotkey

  2. I use a Find and replace tool (F&RT) to switch setting such as colours on the fly. I describe one such use here New feature request: Dark theme / Night mode it should be easier for you to adapt for highlights since there is no need to flip paired settings note how I added it to the internal menu where yours could be for example “Open with highlight red” etc. you should be able to use or mod copies of your 5 color.bats to suit. Also look at why I had to add the two dummy lines you may need to do similar.