Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scrolling with mouse wheel #16

Open
xypron opened this issue Jun 25, 2017 · 7 comments
Open

Scrolling with mouse wheel #16

xypron opened this issue Jun 25, 2017 · 7 comments

Comments

@xypron
Copy link
Contributor

xypron commented Jun 25, 2017

Scrolling with the mouse wheel does not work properly.

You might look at vim option
mouse=a
to understand how it can be fixed.

Best regards

Heinrich Schuchardt

@rsaxvc
Copy link
Contributor

rsaxvc commented Jul 29, 2017

I just tried, and it seems to work for me. What are your terminal settings?

Or, do you mean the text selection wrapping including offsets instead of just hex or instead of just ASCII?

@xypron
Copy link
Contributor Author

xypron commented Jul 30, 2017

@rsaxvc

I am using KDE on Debian Stretch. I have set
Mouse wheel scroll by 5 lines.

Yet I need several ticks on the mouse wheel to move a single line in hexedit.

My expectation is that the cursor moves by 5 lines for every tick.

The same can be achieved in vim by setting mouse=a.

Best regards

Heinrich

@rsaxvc
Copy link
Contributor

rsaxvc commented Jul 30, 2017

"mouse=a" I think that just turns on mouse support in vim for all modes, I don't think that it should adjust anything related to scroll speed, just turn it on.

"I have set Mouse wheel scroll by 5 lines." - KDE has had a scroll-wheel speed setting for ages, but it gets complicated when connecting X11 mice to console programs...

hexedit is not directly aware of scroll wheels, it only uses curses. Somewhere between KDE and curses there is some logic to convert the speed of scrolling into some discrete events, and that is probably not working correctly. Or, it's possible that getch() is returning a key event hexedit does not know how to handle.

"Yet I need several ticks on the mouse wheel to move a single line in hexedit."

I think this means KDE/YourTerminal/curses is sending KEY_UP and KEY_DOWN(or related) codes, just not enough of them. If you run this commit https://github.com/rsaxvc/hexedit/commit/9dd0521f180f4e061aeae04a03ded2e3fc9e3eea, it'll print out what hexedit is receiving from ncurses.

Another thought is that implementing support for ncurses KEY_MOUSE should also be doable, though we'll need to make sure it doesn't interfere with platforms without it, who will continue to send KEY_UP/KEY_DOWN.

@genpfault
Copy link

On my Logitech G100s going through Xorg's libinput driver (the default on Stretch, I think) and "3 lines" in the KDE config page I get a Key:258/Key:259 every one (occasionally) or two (mostly) wheel notches.

@rsaxvc
Copy link
Contributor

rsaxvc commented Aug 8, 2017 via email

@genpfault
Copy link

genpfault commented Aug 8, 2017

The Konsole that Debian Stretch ships:

Konsole
Version 16.12.0
Using:

  • KDE Frameworks 5.28.0
  • Qt 5.7.1 (built against 5.7.1)
  • The xcb windowing system

@xypron
Copy link
Contributor Author

xypron commented Aug 9, 2017

Same for me: KDE Konsole 16.12.0 on Debian Stretch

-- System Information:
Debian Release: 9.1 
  APT prefers stable
  APT policy: (100, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: arm64, armhf

Kernel: Linux 4.9.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages konsole depends on: 
ii  kio                   5.28.0-2
ii  konsole-kpart         4:16.12.0-4
ii  libc6                 2.24-11+deb9u1
ii  libkf5completion5     5.28.0-1
ii  libkf5configcore5     5.28.0-2
ii  libkf5configgui5      5.28.0-2
ii  libkf5configwidgets5  5.28.0-2
ii  libkf5coreaddons5     5.28.0-2
ii  libkf5crash5          5.28.0-1
ii  libkf5dbusaddons5     5.28.0-1
ii  libkf5i18n5           5.28.0-2
ii  libkf5iconthemes5     5.28.0-2
ii  libkf5kiowidgets5     5.28.0-2
ii  libkf5notifyconfig5   5.28.0-1
ii  libkf5widgetsaddons5  5.28.0-3
ii  libkf5windowsystem5   5.28.0-2
ii  libkf5xmlgui5         5.28.0-1
ii  libqt5core5a          5.7.1+dfsg-3+b1
ii  libqt5gui5            5.7.1+dfsg-3+b1
ii  libqt5widgets5        5.7.1+dfsg-3+b1
ii  libstdc++6            6.3.0-18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants