karlch/vimiv

Keybinding to open an image

Closed this issue · 6 comments

I know I can open images my pressing Return. I want to map o (open) to achieve the same behaviour.
I tried with o: Return in my keys.conf file but I (obviously) doesn't work. Is there a workaround for this? Thanks

Meaning you would like o in the library to behave like Return? It is simple for it to behave like l, the binding would then be o: scroll_lib l, but actually also closing the library is currently not possible.

Ok. Thanks! Will use o: scroll_lib l then.

I there a similar trick for thumbnail mode? I can map it to scroll_lib l but that will first open the library.

Unfortunately not, I actually think this is a more general problem. The Return key is used, as it emits a signal in Gtk. There are other keys, which have internal functionality and aren't implemented using the standard command interface. I think this could be solved in general by adding functionality similar to vim's :map command, not sure where this would go in the config though.

That's a good idea!

The initial issue has been fixed in the Qt port with the :open-selected command within this issue for both library and thumbnail mode. I have not found a different usecase for the :map command yet, although it would not be too difficult to implement. Feel free to open an issue there if you can think of more general usecases for the :map command. Sorry for the version chaos, I'm trying to clean up 😄