Keybindings#

Vimiv provides configurable keybindings. The default keybindings are written to the $XDG_CONFIG_HOME/vimiv/keys.conf on first start where $XDG_CONFIG_HOME is usually ~/.config/ if you have not updated it.

The configuration file is structured into sections. Each section corresponds to the mode in which the keybindings are valid. In each section the keybindings are defined using keybinding : command to bind to. Therefore f : fullscreen maps the f key to the fullscreen command. Special keys like space must be wrapped in tags in the form of <space> to allow to differentiate them from sequences of normal keys.

There are two ways to add a new keybinding:

  • Update the configuration file by adding the binding to the appropriate mode to change it permanently

  • Run the :bind command to add it temporarily

If you wish to replace a default keybinding, add a the new keybinding that overrides it. For example to replace the f : fullscreen binding with flip, bind f : flip. To remove a default keybinding via keys.conf, map the key to unbind. In case you would like to enforce a keybinding to do nothing, for example to remove a default Qt binding, use nop instead. :nop is a regular vimiv command that does nothing.

Note

When binding a command including the “%” wildcard which stands for the current file, it must be escaped as “%%” as “%” is treated specially by the python ConfigParser. Special care should be taken if paths could include whitespace as these get escaped using single quotes to a path of the form ‘path with space.jpg’. These single quotes should not clash with other single quotes in the binding. We therefore recommend using double quotes for keybindings that include wildcards as needed.

It is also possible to bind mouse clicks and double clicks. The relevant names are <button-NAME> and <double-button-NAME>. Here NAME stands for the name of the mouse button to bind, e.g. left, middle or right.

Hint

If you want to figure out the name of a specific key or mouse button, run vimiv with --debug gui.eventhandler. You can find the corresponding name in the first output line after pressing/clicking it. For example, when pressing the q key, you would retrieve something along:

DEBUG    <gui.eventhandler>   EventHandlerMixin: handling q for mode library

The following table lists all default keybindings.

Keybindings for global mode#

Keybinding

Command

<colon>

command

o

command –text=’open ‘

yi

copy-image

yI

copy-image –primary

yy

copy-name

ya

copy-name –abspath

yA

copy-name –abspath –primary

yY

copy-name –primary

x

delete %

gi

enter image

gl

enter library

gm

enter manipulate

gt

enter thumbnail

f

fullscreen

G

goto -1

gg

goto 1

m

mark %

q

quit

.

repeat-command

j

scroll down

h

scroll left

l

scroll right

k

scroll up

/

search

?

search –reverse

N

search-next

P

search-prev

zh

set library.show_hidden!

b

set statusbar.show!

tl

toggle library

tm

toggle manipulate

tt

toggle thumbnail

Keybindings for image mode#

Keybinding

Command

M

center

<button-right>

enter library

<button-middle>

enter thumbnail

|

flip

_

flip –vertical

<end>

goto -1

<home>

goto 1

<button-forward>

next

<page-down>

next

n

next

<ctrl>n

next –keep-zoom

<space>

play-or-pause

<button-back>

prev

<page-up>

prev

p

prev

<ctrl>p

prev –keep-zoom

>

rotate

<

rotate –counter-clockwise

W

scale –level=1

<equal>

scale –level=fit

w

scale –level=fit

E

scale –level=fit-height

e

scale –level=fit-width

J

scroll-edge down

H

scroll-edge left

L

scroll-edge right

K

scroll-edge up

sl

set slideshow.delay +0.5

sh

set slideshow.delay -0.5

ss

slideshow

+

zoom in

-

zoom out

Keybindings for library mode#

Keybinding

Command

<button-middle>

enter thumbnail

go

goto 1 –open-selected

zb

move-view bottom

zz

move-view center

zt

move-view top

<button-forward>

scroll down –open-selected

n

scroll down –open-selected

<ctrl>d

scroll half-page-down

<ctrl>u

scroll half-page-up

<button-right>

scroll left

<ctrl>f

scroll page-down

<ctrl>b

scroll page-up

<button-back>

scroll up –open-selected

p

scroll up –open-selected

L

set library.width +0.05

H

set library.width -0.05

Keybindings for thumbnail mode#

Keybinding

Command

$

end-of-line

<button-right>

enter library

^

first-of-line

zb

move-view bottom

zz

move-view center

zt

move-view top

<ctrl>d

scroll half-page-down

<ctrl>u

scroll half-page-up

<button-back>

scroll left

<ctrl>f

scroll page-down

<ctrl>b

scroll page-up

<button-forward>

scroll right

+

zoom in

-

zoom out

Keybindings for command mode#

Keybinding

Command

<tab>

complete

<shift><tab>

complete –inverse

<ctrl>p

history next

<ctrl>n

history prev

<up>

history-substr-search next

<down>

history-substr-search prev

<escape>

leave-commandline

Keybindings for manipulate mode#

Keybinding

Command

<return>

accept

<colon>

command

h

decrease 1

j

decrease 1

H

decrease 10

J

decrease 10

<escape>

discard

f

fullscreen

gg

goto -127

G

goto 127

k

increase 1

l

increase 1

K

increase 10

L

increase 10

n

next

<tab>

next-tab

p

prev

<shift><tab>

prev-tab

b

set statusbar.show!