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

Side by Side Diff: ash/accelerators/accelerator_table.cc

Issue 10452042: Fixing french keyboard handling (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed unit test Created 8 years, 6 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 unified diff | Download patch
« no previous file with comments | « ash/accelerators/accelerator_controller_unittest.cc ('k') | ash/ime_control_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/accelerators/accelerator_table.h" 5 #include "ash/accelerators/accelerator_table.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "ui/base/events.h" 8 #include "ui/base/events.h"
9 9
10 namespace ash { 10 namespace ash {
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 { true, ui::VKEY_1, ui::EF_ALT_DOWN, SELECT_WIN_0 }, 77 { true, ui::VKEY_1, ui::EF_ALT_DOWN, SELECT_WIN_0 },
78 { true, ui::VKEY_2, ui::EF_ALT_DOWN, SELECT_WIN_1 }, 78 { true, ui::VKEY_2, ui::EF_ALT_DOWN, SELECT_WIN_1 },
79 { true, ui::VKEY_3, ui::EF_ALT_DOWN, SELECT_WIN_2 }, 79 { true, ui::VKEY_3, ui::EF_ALT_DOWN, SELECT_WIN_2 },
80 { true, ui::VKEY_4, ui::EF_ALT_DOWN, SELECT_WIN_3 }, 80 { true, ui::VKEY_4, ui::EF_ALT_DOWN, SELECT_WIN_3 },
81 { true, ui::VKEY_5, ui::EF_ALT_DOWN, SELECT_WIN_4 }, 81 { true, ui::VKEY_5, ui::EF_ALT_DOWN, SELECT_WIN_4 },
82 { true, ui::VKEY_6, ui::EF_ALT_DOWN, SELECT_WIN_5 }, 82 { true, ui::VKEY_6, ui::EF_ALT_DOWN, SELECT_WIN_5 },
83 { true, ui::VKEY_7, ui::EF_ALT_DOWN, SELECT_WIN_6 }, 83 { true, ui::VKEY_7, ui::EF_ALT_DOWN, SELECT_WIN_6 },
84 { true, ui::VKEY_8, ui::EF_ALT_DOWN, SELECT_WIN_7 }, 84 { true, ui::VKEY_8, ui::EF_ALT_DOWN, SELECT_WIN_7 },
85 { true, ui::VKEY_9, ui::EF_ALT_DOWN, SELECT_LAST_WIN }, 85 { true, ui::VKEY_9, ui::EF_ALT_DOWN, SELECT_LAST_WIN },
86 86
87 // We need the number keys with and without shift since the French keyboard
88 // does not have explicit number keys. Instead they have to press
89 // 'Shift' + .. to access the keys. If we ever have an overlap of
90 // functionality, we should think about either assembling this table
91 // dynamically - or by decoding the keys properly (which is of course in
92 // conflict with other keyboards since the Shift+ is missing then).
93 { true, ui::VKEY_1, ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN, SELECT_WIN_0 },
94 { true, ui::VKEY_2, ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN, SELECT_WIN_1 },
95 { true, ui::VKEY_3, ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN, SELECT_WIN_2 },
96 { true, ui::VKEY_4, ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN, SELECT_WIN_3 },
97 { true, ui::VKEY_5, ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN, SELECT_WIN_4 },
98 { true, ui::VKEY_6, ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN, SELECT_WIN_5 },
99 { true, ui::VKEY_7, ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN, SELECT_WIN_6 },
100 { true, ui::VKEY_8, ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN, SELECT_WIN_7 },
101 { true, ui::VKEY_9, ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN, SELECT_LAST_WIN },
102
103 // Window management shortcuts. 87 // Window management shortcuts.
104 { true, ui::VKEY_OEM_4, ui::EF_ALT_DOWN, WINDOW_SNAP_LEFT }, 88 { true, ui::VKEY_OEM_4, ui::EF_ALT_DOWN, WINDOW_SNAP_LEFT },
105 { true, ui::VKEY_OEM_6, ui::EF_ALT_DOWN, WINDOW_SNAP_RIGHT }, 89 { true, ui::VKEY_OEM_6, ui::EF_ALT_DOWN, WINDOW_SNAP_RIGHT },
106 { true, ui::VKEY_OEM_MINUS, ui::EF_ALT_DOWN, WINDOW_MINIMIZE }, 90 { true, ui::VKEY_OEM_MINUS, ui::EF_ALT_DOWN, WINDOW_MINIMIZE },
107 { true, ui::VKEY_OEM_PLUS, ui::EF_ALT_DOWN, WINDOW_MAXIMIZE_RESTORE }, 91 { true, ui::VKEY_OEM_PLUS, ui::EF_ALT_DOWN, WINDOW_MAXIMIZE_RESTORE },
108 { true, ui::VKEY_OEM_PLUS, ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN, 92 { true, ui::VKEY_OEM_PLUS, ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN,
109 WINDOW_POSITION_CENTER }, 93 WINDOW_POSITION_CENTER },
110 94
111 { true, ui::VKEY_F3, 95 { true, ui::VKEY_F3,
112 ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN, 96 ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN,
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 arraysize(kActionsAllowedAtLoginOrLockScreen); 141 arraysize(kActionsAllowedAtLoginOrLockScreen);
158 142
159 const AcceleratorAction kActionsAllowedAtLockScreen[] = { 143 const AcceleratorAction kActionsAllowedAtLockScreen[] = {
160 EXIT, 144 EXIT,
161 }; 145 };
162 146
163 const size_t kActionsAllowedAtLockScreenLength = 147 const size_t kActionsAllowedAtLockScreenLength =
164 arraysize(kActionsAllowedAtLockScreen); 148 arraysize(kActionsAllowedAtLockScreen);
165 149
166 } // namespace ash 150 } // namespace ash
OLDNEW
« no previous file with comments | « ash/accelerators/accelerator_controller_unittest.cc ('k') | ash/ime_control_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698