llpp is a lightweight, fast and featureful PDF, EPUB, XPS and CBZ viewer based on MuPDF. It supports outline/bookmark/birdview/annotation views by one key pressed, It also supports vi-like custom key bindings by adding keymaps to achieve mouse free navigation.

Keymaps

The keybindings with the fresh install is not familiar for me to use actually. After checking the reference on archlinux, I find it is possible to configure key bindings. The configuration file locates in $HOME/.config/llpp.conf, I modified it as follows by adding keymap definitions as below after a few tries.

Since there is no way for me to configure the shortcut keys of the foxit reader, and the ‘future’ version keep ignoring it. The custom key bindings helps me to replace foxit pdf reader with llpp as my default pdf viewer.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<defaults>
<keymap mode='global'>
<map in='ctrl-j' out='down'/>
<map in='ctrl-c' out='ctrl-ins'/>
<map in='ctrl-e' out='pgup'/>
<map in='ctrl-k' out='up'/>
<map in='ctrl-v' out='shift-ins'/>
<map in='ctrl-f' out='pgdown'/>
<map in='ctrl-d' out='pgdown'/>
<map in='ctrl-b' out='pgup'/>
</keymap>
<keymap mode='outline'>
<map in='tab' out='esc'/>
<map in='ctrl-e' out='pgup'/>
<map in='ctrl-d' out='pgdown'/>
</keymap>
<keymap mode='birdseye'>
<map in='k' out='up'/>
<map in='ctrl-u' out='ctrl-k'/>
<map in='u' out='ctrl-k'/>
<map in='l' out='right'/>
<map in='j' out='down'/>
<map in='f' out='pgdown'/>
<map in='d' out='ctrl-j'/>
<map in='f11' out='f'/>
<map in='ctrl-d' out='ctrl-j'/>
<map in='b' out='pgup'/>
<map in='h' out='left'/>
</keymap>
<keymap mode='view'>
<map in='tab' out='o'/>
<map in='k' out='up'/>
<map in='ctrl-u' out='ctrl-k'/>
<map in='=' out='ctrl-='/>
<map in='esc' out=''/>
<map in='u' out='ctrl-k'/>
<map in='l' out='right'/>
<map in='j' out='down'/>
<map in='w' out='ctrl-w'/>
<map in='f' out='pgdown'/>
<map in='e' out='ctrl-up'/>
<map in='d' out='ctrl-down'/>
<map in='f11' out='f'/>
<map in='-' out='ctrl--'/>
<map in='ctrl-d' out='ctrl-j'/>
<map in='b' out='pgup'/>
<map in='x' out='q'/>
<map in='h' out='left'/>
</keymap>
</defaults>

Text copy and paste

Before I use llpp as pdf viewer, I tried MuPDF once, the keyboard short-cuts and render result is quite satisfactory, but text selecting in MuPDF is terrible. Since llpp is based on MuPDF, I’m very concerned about text select and paste.

The initial select function cannot copy the selected text to clipboard. It must be using terminal like mechanism by sending selected text to xclip buffer instead of clipboard, you need middle button clicking to paste highlighted text. Fortunately there is an issue addressing this problem, if you want copy/paste the selected text to/from clipboard instead of xclip buffer, the select-command and paste-command in llpp.conf need change to:

selection-command='LC_CTYPE=UTF-8 xclip -i -selection clipboard'
paste-command='LC_CTYPE=UTF-8 xclip -o -selection clipboard'

Press shift-insert to paste clipboard text. Also, you can map ctrl-v to shift-ins in the global keymap if you want to use ctrl-v instead.

Printing

Document printing is also use external command in llpp, the path-launcher in the llpp.conf is initially dedicated using lp to handle printing functionality. ctrl-p is the keyboard shortcut to print document.

Furthermore, you also can change lp to gtklp, it can provide a GUI print dialog for detailed printing configurations.

path-launcher='gtklp -o media=a4 -o fit-to-page &quot;%s&quot;'

You may encounter a problem when use llpp for the first time, it cannot open links in the default browser. The uri-launcher in llpp.conf is responsible for this issue. To open links in your default browser, the setting need to change like:

uri-launcher='xdg-open &quot;%s&quot;'

Annotations

You can annotate a pdf with Shift + Right Click. To allow saving of annotations add

savepath-command='echo %s'

After annotating the file, save the changes by pressing W. This echos the current pdf path to the option savepath-command.