artemsen / swayimg

Image viewer for Wayland
MIT License
379 stars 31 forks source link

Add support for 2-dimensional scrolling with touch pads. #111

Closed SpaceshipOperations closed 10 months ago

SpaceshipOperations commented 10 months ago

This PR adds support for 2-dimensional scrolling, which is useful for touch pad users.

In order to facilitate, the keyboard symbols that scroll events map into were changed into the keypad up/down/left/right keys (so now we have four symbols rather than two), and default bindings were added for those symbols so that two-dimensional touch pad scrolling works out-of-the-box.

artemsen commented 10 months ago

Please, remove the dot from the commit subject, put your first comment into commit message, and add Signed-off-by to last line.

SpaceshipOperations commented 10 months ago

Please, remove the dot from the commit subject, put your first comment into commit message, and add Signed-off-by to last line.

Done.

Not enough one space and one space is excessive.

Fixed.

Do we really need this block?

Oh, I realized that the symbols were already defined. I removed the block.

Using keys for touch/mouse is a dirty hack. I think we need own codes for that, may be not in this PR, but in the future.

I'm aware. I'm considering doing that myself, but I'd need to dig up some documentation/examples, so for the time being I went with the absolutely bare minimum modification lol.

artemsen commented 10 months ago

Thanks!