geeqie icon indicating copy to clipboard operation
geeqie copied to clipboard

Allow to map Prev/NextImage actions to Left/Right keys

Open pevik opened this issue 8 months ago • 7 comments

Setup (please complete the following information):

  • Geeqie version: Geeqie 2.5 GTK3

I have Logitech Wireless Presenter which has only Left and Right keys (113 Left and 114 Right). Geeqie allows to map 3 keys for each of the actions. But I was not able to map neither Left nor Right to it. And indeed, Left and Right keys are for scrolling left/right (Pan window non-programmable keyboard shortcuts). Does it mean that it's not possible to change meaning of Left/Right keys and I have to use e.g. xmodmap to remap the keys?

pevik avatar Apr 10 '25 19:04 pevik

Go to Edit/Preferences/Behavior and scroll down to Navigation by left or middle click Unfortunately that gives you half a solution.

The data I have found for the Logitech R800 Laser Pointer states that the keys are mapped to Page Up/Page Down. Is that the model you are using?

caclark avatar Apr 11 '25 10:04 caclark

Logitech Wireless Presenter R500s Graphite https://support.logi.com/hc/en-us/articles/360023459813-Getting-Started-R500

pevik avatar Apr 11 '25 14:04 pevik

Sorry, I misunderstood your question.

Unfortunately the only solution is to use xmodmap to remap the keys.

caclark avatar Apr 12 '25 13:04 caclark

I workaround it with xmodmap but it's quite unfortune, because xmodmap needs to be run after qeeqie presentation is set. I wonder how hard would be to modify qeeqie to allow this. I suppose scrolling left/right would also have to be modifiable (one would set them to something else).

Other option could be to be able to disable scrolling left/right (in Setup behavior section), which would then allow to use left and right.

Anyway I guess one of these source files does the scrolling, right?

$ git grep static.*image.*scroll
src/image.cc:static void image_scroll_notify_cb(PixbufRenderer *pr, gpointer data)
src/image.cc:static gboolean image_scroll_cb(GtkWidget *, GdkEventScroll *event, gpointer data)
src/layout-image.cc:static void layout_image_scroll_cb(ImageWindow *imd, GdkEventScroll *event, gpointer data)
src/pan-view/pan-view.cc:static void pan_window_image_scroll_notify_cb(PixbufRenderer *pr, gpointer data)

pevik avatar Apr 12 '25 20:04 pevik

because xmodmap needs to be run after qeeqie presentation is set

I am sorry - I am not sure that I understand. Do you mean that, e.g.:

  1. Start Geeqie
  2. Select files for a slideshow
  3. Decide at that point that you want to use the laser pointer

caclark avatar Apr 13 '25 09:04 caclark

because xmodmap needs to be run after qeeqie presentation is set

I am sorry - I am not sure that I understand. Do you mean that, e.g.:

  1. Start Geeqie
  2. Select files for a slideshow
  3. Decide at that point that you want to use the laser pointer

It looked to me that xmodmap must be run after Geeqie is running, not before. But maybe I did something wrong. Anyway, I'm going to get another presenter which will use PageUp/PageDown, unless it's doable to modify Geeqie to support Left/Right (using xmodmap is not practical, one presentation was enough :)). It's a bit unfortune because Left/Right is supported in e.g. pdf viewers (at least Evince).

pevik avatar Apr 13 '25 17:04 pevik

Perhaps it is possible to use command-line action options. For example if Geeqie is running, open another window terminal and type geeqie --action=NextImage

or geeqie --action=PrevImage

So you would need a script or program to capture the codes emitted by the laser pointer and execute the correct command line opertion. Maybe ChatGPT could write that for you.

caclark avatar Apr 14 '25 16:04 caclark