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

Support scrolling with the `Home` and `End` keys #14212

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Support scrolling with the `Home` and `End` keys

  • Loading branch information
nerith committed Nov 4, 2016
commit 2b70f3e80191f97553bd9359a6c8feff84335256
@@ -1117,6 +1117,22 @@ impl WindowMethods for Window {
.height - 2.0 * LINE_HEIGHT,
TouchEventType::Move);
}
(NONE, None, Key::End) => {
self.scroll_window(0.0,
-self.size()
.to_f32()
.to_untyped()
.height * LINE_HEIGHT,
TouchEventType::Move);
}
(NONE, None, Key::Home) => {
self.scroll_window(0.0,
self.size()
.to_f32()
.to_untyped()
.height * LINE_HEIGHT,
TouchEventType::Move);
}
(NONE, None, Key::Up) => {
self.scroll_window(0.0, 3.0 * LINE_HEIGHT, TouchEventType::Move);
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.