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

Scroll more if Control is pressed #24

Open
alexcastano opened this issue Nov 23, 2016 · 4 comments
Open

Scroll more if Control is pressed #24

alexcastano opened this issue Nov 23, 2016 · 4 comments

Comments

@alexcastano
Copy link

I think a cool feature could be if the Control key (or other modifier key) is pressed, the number of lines scrolled are different. For example, if control is pressed 30 lines are scrolled. This can be done with a multiplier (x10) or just another scroll speed variable.

Thank you for your time :)

@NHDaly
Copy link
Owner

NHDaly commented Nov 26, 2016

Yeah that's a pretty cool idea! I probably won't get to this any time soon, but if anyone wants to send a PR that would be awesome! :D

@NHDaly
Copy link
Owner

NHDaly commented Oct 19, 2017

Oh cool! I don't know if this existed last year, but it seems really easy now! You just need to add the C- prefix to do a ctrl modifier, and S- prefix to do a shift modifier.

So to do what you asked:

bind-key -T copy-mode    C-WheelUpPane         send-keys -X -N 30 scroll-up
bind-key -T copy-mode-vi C-WheelUpPane         send-keys -X -N 30 scroll-up
bind-key -T copy-mode    C-WheelDownPane         send-keys -X -N 30 scroll-down
bind-key -T copy-mode-vi C-WheelDownPane         send-keys -X -N 30 scroll-down

# This is the ugly one built programmatically from the script. Just have to copy/paste it unfortunately:
bind-key -T root C-WheelUpPane      if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "         if -Ft= '#{alternate_on}'           \"send-keys -t= up ; \"           \"                          if -Ft= '#{pane_in_mode}'               'send-keys -M ; '               'copy-mode -e ; send-keys -M ; '           \"       "

Cool idea! :)

@eMPee584
Copy link

Mhh couldn't a distinct factor for each modifier key be used in get_repeated_scroll_cmd(), i.e. CTRL to speed up, SHIFT to slow down...?

@NHDaly
Copy link
Owner

NHDaly commented Oct 25, 2017

Yeah totally. Do we think that's a thing people would want to use?

We could add it to the plugin if so. Should we just add a boolean option to enable/disable the speed-modifiers? Or add an option to specify the mapping for fast/slow scroll?

I'm interested in others' input here on what would be useful.

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

No branches or pull requests

3 participants