sumatrapdf icon indicating copy to clipboard operation
sumatrapdf copied to clipboard

Semicolon/-/= keybinds don't always work with modifiers

Open eugenesvk opened this issue 4 months ago • 4 comments

SumatraPDF version

  • 3.6.17065 64 bit pre-release

Describe the bug

Only Key = ; works

	[
		Cmd = CmdGoToPage
		Key = ;
	]
	[
		Cmd = CmdGoToPage
		Key = Alt+;
	]
	[
		Cmd = CmdGoToPage
		Key = Shift+;
	]
	[
		Cmd = CmdGoToPage
		Key = Ctrl+;
	]

A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Set keybinds listed above in advanced config
  2. Use them
  3. See error that only ; is working to select the goto field

Expected behavior All keybinds with ; work

File that reproduces the problem n/a

Screenshots n/a

Additional context Tried semicolon, but that also didn't work, not a valid command : works Alt+; open the menu even though there are no menu accelerators starting with ; (and anyway, shortcut should override it)

eugenesvk avatar Sep 12 '25 14:09 eugenesvk

Similarly, - = only works without modifiers, cant't suppress Ctrl+- Ctrl+=

	[
		Cmd = CmdNone
		Key = -
	]
	[
		Cmd = CmdNone
		Key = =
	]
	[
		Cmd = CmdNone
		Key = Ctrl+=
	]
	[
		Cmd = CmdNone
		Key = Ctrl++
	]
	[
		Cmd = CmdNone
		Key = Ctrl+-
	]
	[
		Cmd = CmdNone
		Key = Ctrl+=
	]
	[
		Cmd = CmdNone
		Key = Ctrl+Add
	]
	[
		Cmd = CmdNone
		Key = Ctrl+Subtract
	]
]

eugenesvk avatar Sep 12 '25 15:09 eugenesvk

And [ ] seems to have the same issue

eugenesvk avatar Sep 12 '25 15:09 eugenesvk

hmm I have not tested all and can depend on where the change is made certain keys are likely to cause issues such as perhaps more global ones for advanced text setting like [ ] and thus would avoid modifier + ] since this should bork

Shortcuts [
	[
		Cmd = CmdZoomCustom 77%
		Key = Ctrl + ]
		ToolbarText = 77%
	]
]

but this should work

Shortcuts [
	[
		Cmd = CmdZoomCustom 77%
		Key = Ctrl + 7
		ToolbarText = 77%
	]
]

GitHubRulesOK avatar Sep 12 '25 16:09 GitHubRulesOK

It shouldn't really bork your first example since the current formatting is inflexible: you can't use closing ] on the same line, so Key should be fine with parsing till newline and treat everything as keys, not as opening/closing brackets. But in general, that's exactly the issue with using custom "simple" bugged formats, users have no indication that something is wrong when editing https://github.com/sumatrapdfreader/sumatrapdf/issues/4303

eugenesvk avatar Sep 12 '25 17:09 eugenesvk