Chromium Code Reviews| Index: ui/views/controls/textfield/textfield.cc |
| diff --git a/ui/views/controls/textfield/textfield.cc b/ui/views/controls/textfield/textfield.cc |
| index b31dd2d0737218a3d623dd54b9eb3ba9f2be0594..edc247de498c140efb0051003b22a6726cbd9cd4 100644 |
| --- a/ui/views/controls/textfield/textfield.cc |
| +++ b/ui/views/controls/textfield/textfield.cc |
| @@ -844,11 +844,18 @@ void Textfield::AboutToRequestFocusFromTabTraversal(bool reverse) { |
| bool Textfield::SkipDefaultKeyEventProcessing(const ui::KeyEvent& event) { |
| #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| + // TODO: This bool needs to be set if the key corresponds to altgr+left. |
| + // Linux doesn't have a built-in shortcut for alt+left, so alt doesn't |
| + // need special handling here, but altgr does even thought it doesn't do |
| + // anything with the left arrow as best I can tell. |
| + bool isAltGrLeftBackNavigation = true; |
|
ojan
2016/05/27 00:53:54
This is the bit of code that needs to be finished
Peter Kasting
2016/05/27 01:11:01
Let me see if I understand. This code needs to re
|
| + |
| // Skip any accelerator handling that conflicts with custom keybindings. |
| ui::TextEditKeyBindingsDelegateAuraLinux* delegate = |
| ui::GetTextEditKeyBindingsDelegate(); |
| std::vector<ui::TextEditCommandAuraLinux> commands; |
| - if (delegate && delegate->MatchEvent(event, &commands)) { |
| + if (!isAltGrLeftBackNavigation && |
| + (delegate && delegate->MatchEvent(event, &commands))) { |
| const bool rtl = GetTextDirection() == base::i18n::RIGHT_TO_LEFT; |
| for (size_t i = 0; i < commands.size(); ++i) |
| if (IsCommandIdEnabled(GetViewsCommand(commands[i], rtl))) |