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; |
+ } |
} |
} |