3

I want to configure feh so that the arrow keys and h, j, k, l to scroll the image left/down/up/right.

I put following in ~/.config/feh/keys:

zoom_in 
zoom_out 
scroll_right 
scroll_left 
scroll_up 
scroll_down 
zoom_in plus
zoom_out minus
scroll_up Up j
scroll_down Down k
scroll_left Left h
scroll_right Right l 

What does not work is scrolling with the arrow keys left and right. Up and down and everything else works. What to do?

feh version is:

feh version 2.18
Compile-time switches: curl xinerama 
viuser
  • 2,564
  • 3
  • 29
  • 57

1 Answers1

5

One has to unset the key binding for the action bound to the key before one can use the key for another action.

(cursor-right) and (cursor-left) are bound to the action next_img and prev_img respectively.

So using:

# unsetting the keys bound to next/previous image by stating it without assigning any keys:
next_img
prev_img
# further unsetting:
zoom_in 
zoom_out 
scroll_right 
scroll_left 
scroll_up 
scroll_down 
# custom key mapping:
zoom_in plus
zoom_out minus
scroll_up Up j
scroll_down Down k
scroll_left Left h
scroll_right Right l
# assigning new keys for showing next/previous image
next_img space 
prev_img BackSpace

makes feh use the arrow keys for scrolling and space/backspace for next/previous image.

viuser
  • 2,564
  • 3
  • 29
  • 57