Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1051)

Unified Diff: pdf/instance.cc

Issue 606933002: PDF: Change the rotate shortcut keys to ctrl+[] on all platforms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/pdf/pdf.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pdf/instance.cc
diff --git a/pdf/instance.cc b/pdf/instance.cc
index 6a68400d6ee4e185291c7c5c8fcf7d9174056752..46c9cac84d421005a930b9516d08dfcbffa67216 100644
--- a/pdf/instance.cc
+++ b/pdf/instance.cc
@@ -587,21 +587,26 @@ bool Instance::HandleInputEvent(const pp::InputEvent& event) {
}
}
- if (event.GetType() == PP_INPUTEVENT_TYPE_KEYDOWN &&
- event.GetModifiers() & kDefaultKeyModifier) {
+ if (event.GetType() == PP_INPUTEVENT_TYPE_KEYDOWN) {
pp::KeyboardInputEvent keyboard_event(event);
- switch (keyboard_event.GetKeyCode()) {
- case 'A':
- engine_->SelectAll();
- return true;
- case ui::VKEY_OEM_4:
- // Left bracket.
- engine_->RotateCounterclockwise();
- return true;
- case ui::VKEY_OEM_6:
- // Right bracket.
- engine_->RotateClockwise();
- return true;
+ if (event.GetModifiers() & kDefaultKeyModifier) {
+ switch (keyboard_event.GetKeyCode()) {
+ case 'A':
+ engine_->SelectAll();
+ return true;
+ }
+ }
+ else if (event.GetModifiers() & PP_INPUTEVENT_MODIFIER_CONTROLKEY) {
raymes 2014/09/26 02:49:26 nit: shift onto the previous line
Lei Zhang 2014/09/26 04:31:41 Done.
+ switch (keyboard_event.GetKeyCode()) {
+ case ui::VKEY_OEM_4:
+ // Left bracket.
+ engine_->RotateCounterclockwise();
+ return true;
+ case ui::VKEY_OEM_6:
+ // Right bracket.
+ engine_->RotateClockwise();
+ return true;
+ }
}
}
« no previous file with comments | « chrome/browser/resources/pdf/pdf.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698