Index: ash/accelerators/accelerator_controller.cc |
diff --git a/ash/accelerators/accelerator_controller.cc b/ash/accelerators/accelerator_controller.cc |
index fa8192731902c46b30ceb9f4b9bfd183d92c1ff0..52b834a81df6e4b9bd133c91b3d1da8387c24d2f 100644 |
--- a/ash/accelerators/accelerator_controller.cc |
+++ b/ash/accelerators/accelerator_controller.cc |
@@ -242,6 +242,21 @@ void AcceleratorController::UnregisterAll(ui::AcceleratorTarget* target) { |
} |
bool AcceleratorController::Process(const ui::Accelerator& accelerator) { |
+ // On French keyboards the user needs to press a number key in conjunction |
+ // with the shift key. To get the right accelerator from our static table |
+ // we modify the received accelerator to match this. |
+ if (accelerator.key_code() >= ui::VKEY_0 && |
mazda
2012/05/25 22:52:38
I'm worried about letting AcceleratorController ha
Mr4D (OOO till 08-26)
2012/05/29 14:59:25
Done
|
+ accelerator.key_code() <= ui::VKEY_9) { |
+ // A keyboard layout can get changed by the user, so we need to dynamically |
+ // check if a modification is required. |
+ if (ime_control_delegate_.get() && |
+ ime_control_delegate_->IsFrenchKeyboard()) { |
+ // We toggle the shift key to get the correct accelerator from our table. |
+ return accelerator_manager_->Process( |
+ ui::Accelerator(accelerator.key_code(), |
+ accelerator.modifiers() ^ ui::EF_SHIFT_DOWN)); |
+ } |
+ } |
return accelerator_manager_->Process(accelerator); |
} |