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

Side by Side Diff: chrome/browser/chromeos/input_method/xkeyboard.h

Issue 6975057: Listen to XI_HierarchyChanged events and call setxkbmap when needed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added workaround for crbug.com/84694 Created 9 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/browser_shutdown.cc ('k') | chrome/browser/chromeos/input_method/xkeyboard.cc » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_XKEYBOARD_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_XKEYBOARD_H_
6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_XKEYBOARD_H_ 6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_XKEYBOARD_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 28 matching lines...) Expand all
39 } 39 }
40 ModifierKey original; // Replace the key with 40 ModifierKey original; // Replace the key with
41 ModifierKey replacement; // this key. 41 ModifierKey replacement; // this key.
42 }; 42 };
43 typedef std::vector<ModifierKeyPair> ModifierMap; 43 typedef std::vector<ModifierKeyPair> ModifierMap;
44 44
45 // Sets the current keyboard layout to |layout_name|. This function does not 45 // Sets the current keyboard layout to |layout_name|. This function does not
46 // change the current mapping of the modifier keys. Returns true on success. 46 // change the current mapping of the modifier keys. Returns true on success.
47 bool SetCurrentKeyboardLayoutByName(const std::string& layout_name); 47 bool SetCurrentKeyboardLayoutByName(const std::string& layout_name);
48 48
49 // Sets the current keyboard layout again. We have to call the function every
50 // time when "XI_HierarchyChanged" XInput2 event is sent to Chrome. See
51 // xinput_hierarchy_changed_event_listener.h for details.
52 bool ReapplyCurrentKeyboardLayout();
53
49 // Remaps modifier keys. This function does not change the current keyboard 54 // Remaps modifier keys. This function does not change the current keyboard
50 // layout. Returns true on success. 55 // layout. Returns true on success.
51 // Notice: For now, you can't remap Left Control and Left Alt keys to CapsLock. 56 // Notice: For now, you can't remap Left Control and Left Alt keys to CapsLock.
52 bool RemapModifierKeys(const ModifierMap& modifier_map); 57 bool RemapModifierKeys(const ModifierMap& modifier_map);
53 58
54 // Turns on and off the auto-repeat of the keyboard. Returns true on success. 59 // Turns on and off the auto-repeat of the keyboard. Returns true on success.
55 bool SetAutoRepeatEnabled(bool enabled); 60 bool SetAutoRepeatEnabled(bool enabled);
56 61
57 // Sets the auto-repeat rate of the keyboard, initial delay in ms, and repeat 62 // Sets the auto-repeat rate of the keyboard, initial delay in ms, and repeat
58 // interval in ms. Returns true on success. 63 // interval in ms. Returns true on success.
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 void SetCapsLockEnabled(bool enabled); 103 void SetCapsLockEnabled(bool enabled);
99 104
100 // Returns true if |key| is in |modifier_map| as replacement. 105 // Returns true if |key| is in |modifier_map| as replacement.
101 bool ContainsModifierKeyAsReplacement( 106 bool ContainsModifierKeyAsReplacement(
102 const ModifierMap& modifier_map, ModifierKey key); 107 const ModifierMap& modifier_map, ModifierKey key);
103 108
104 } // namespace input_method 109 } // namespace input_method
105 } // namespace chromeos 110 } // namespace chromeos
106 111
107 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_XKEYBOARD_H_ 112 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_XKEYBOARD_H_
OLDNEW
« no previous file with comments | « chrome/browser/browser_shutdown.cc ('k') | chrome/browser/chromeos/input_method/xkeyboard.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698