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

Add keybinding for moving up/down an entire page at a time #640

Closed
zadjii-msft opened this issue May 9, 2019 · 9 comments
Closed

Add keybinding for moving up/down an entire page at a time #640

zadjii-msft opened this issue May 9, 2019 · 9 comments
Labels
Area-User Interface Issues pertaining to the user interface of the Console or Terminal Help Wanted We encourage anyone to jump in on these. Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Milestone

Comments

@zadjii-msft
Copy link
Member

zadjii-msft commented May 9, 2019

Ctrl+Shift+PgUp/Dn should move an entire page at a time

Ctrl+Shift+Up/Dn Arrow should move one (N) lines at a time

@zadjii-msft zadjii-msft added Area-User Interface Issues pertaining to the user interface of the Console or Terminal Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. labels May 9, 2019
@zadjii-msft zadjii-msft added this to the Windows Terminal v1.0 milestone May 9, 2019
@zadjii-msft zadjii-msft added the Help Wanted We encourage anyone to jump in on these. label May 9, 2019
@Kapperchino
Copy link
Contributor

Kapperchino commented May 10, 2019

@zadjii-msft Can I be assigned this issue?
Also how do I contact you guys for help when needed?

@miniksa
Copy link
Member

miniksa commented May 10, 2019

@zadjii-msft, can you follow a similar outline to #576 (comment) to get @Kapperchino started when you see this presuming you're good with it?

@zadjii-msft
Copy link
Member Author

Absolutely!

  • I'd first take a look at how to add a new keybinding event. Take a look at add shortcut alt-* for select tab #623, where someone's adding a keybinding for alt+num to go to a particular tab as reference.
  • I'd also take a look at the existing keybinding for Ctrl+Shift+pgup/dn as a reference how to scroll one line at a time. See src/cascadia/terminalapp/app.cpp for the implementation of _DoScroll.
  • I'd add another method like DoScroll, but instead of scrolling by a specified amount, only specify a direction, and have the method query the active terminal control for how tall it is, and scroll by that amount.
  • as an additional note, this involves changing the current keybindings for scroll up/down to Ctrl+Shift+Up/Dn Arrow. Those are setup in CascadiaSettings.cpp I believe.

As @miniksa mentioned, you're going to be among the first people we assign to do a feature that aren't on our direct team. It might be rough and neither we nor you know exactly what to expect. Bear with us. We're learning how to be open as much as you're learning how to work in our code.

If you need any help, please feel free to ping me on this thread. I'm happy to help.

@Kapperchino
Copy link
Contributor

@zadjii-msft For the height of the terminal, do I get the view height and then calculate how many lines that would be? Or is there a way to get how many lines of text the terminal has?

@zadjii-msft
Copy link
Member Author

I think that Terminal::GetViewport().Height() would bet you the height of the terminal in rows. You might need to plumb that up through the TermControl somehow.

@Kapperchino
Copy link
Contributor

@zadjii-msft how do I make a test for this? I did some manual testing.

@zadjii-msft
Copy link
Member Author

You know, I don't think we actually have any test for this particular area of the code. So I think you're probably fine making a PR without the tests for now. That's on me to add the testing infrastructure :P

@Kapperchino
Copy link
Contributor

alright, I'll be doing the pr then, thanks for your help!

@ghost ghost added the Needs-Tag-Fix Doesn't match tag requirements label May 17, 2019
@miniksa miniksa added Product-Terminal The new Windows Terminal. and removed Mass-Chaos labels May 17, 2019
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label May 17, 2019
@miniksa miniksa added the Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. label May 21, 2019
@miniksa
Copy link
Member

miniksa commented May 21, 2019

Looks like the related PR was completed. Resolving.

@miniksa miniksa closed this as completed May 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-User Interface Issues pertaining to the user interface of the Console or Terminal Help Wanted We encourage anyone to jump in on these. Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Projects
None yet
Development

No branches or pull requests

3 participants