1

I'd like to map b to scroll back one screen in Zathura. I tried:

map <B> <C-b>

But it returns the error:

warning: Invalid special key value or mode: B

Based on this bug report, I managed to achieve the functionality with

map b feedkeys <C-b>

But zathura returns the following error on every b key pressed:

(zathura:6582): Gdk-WARNING **: 15:26:58.771: 
Event with type 8 not holding a GdkDevice. 
It is most likely synthesized outside Gdk/GTK+
Paul Rougieux
  • 165
  • 9
  • 23

2 Answers2

1

In man zathurarc, you can find scroll under "Shortcut functions". You can also set the total displacement of the scroll with scroll-step.

To make the map work, add this to ~/.config/zathura/zathurarc:

set scroll-step 300
map B scroll up
map b scroll down

Fine tune scroll-step to the value you like best. And if you ask me how on earth I discovered the necessary up and down arguments, believe me that it was on blind trials and errors. Although Zathura is great, it is bad documented when it comes to more detailed customizations.

0

From man zathurarc

use map b scroll full-up Each key can be bound to a shortcut function as map [mode] <binding> <shortcut function> <argument> where the mode is optional. In my example, the mode is not given, the binding is the single letter b , the shortcut function is scroll with an optional argument of full up. Each shortcut functions can optional arguments, a list of possible arguments are listed in the documentation. But what arguments each function can take is not documented. Through educated guessing, I found that the scroll function can take the argument full-up.

Progamer
  • 1
  • 1
  • 1
    Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Mar 20 '23 at 01:29