| Index: chromeos_keyboard.h
|
| diff --git a/chromeos_keyboard.h b/chromeos_keyboard.h
|
| deleted file mode 100644
|
| index 154fc45fde45925b263485f38452e82a88f9ad76..0000000000000000000000000000000000000000
|
| --- a/chromeos_keyboard.h
|
| +++ /dev/null
|
| @@ -1,106 +0,0 @@
|
| -// Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
|
| -// Use of this source code is governed by a BSD-style license that can be
|
| -// found in the LICENSE file.
|
| -//
|
| -// DEPRECATED. TODO(satorux): Remove this file.
|
| -
|
| -#ifndef CHROMEOS_KEYBOARD_H_
|
| -#define CHROMEOS_KEYBOARD_H_
|
| -
|
| -#include <map>
|
| -#include <string>
|
| -#include <vector>
|
| -
|
| -namespace chromeos {
|
| -
|
| -struct AutoRepeatRate {
|
| - AutoRepeatRate() : initial_delay_in_ms(0), repeat_interval_in_ms(0) {}
|
| - unsigned int initial_delay_in_ms;
|
| - unsigned int repeat_interval_in_ms;
|
| -};
|
| -
|
| -enum ModifierKey {
|
| - kSearchKey = 0, // Customizable.
|
| - kLeftControlKey, // Customizable.
|
| - kLeftAltKey, // Customizable.
|
| - kVoidKey,
|
| - kCapsLockKey,
|
| - // IMPORTANT: You should update kCustomizableKeys[] in .cc file, if you
|
| - // add a customizable key.
|
| - kNumModifierKeys,
|
| -};
|
| -
|
| -struct ModifierKeyPair {
|
| - ModifierKeyPair(ModifierKey in_original, ModifierKey in_replacement)
|
| - : original(in_original), replacement(in_replacement) {}
|
| - bool operator==(const ModifierKeyPair& rhs) const {
|
| - // For CheckMap() in chromeos_keyboard_unittest.cc.
|
| - return (rhs.original == original) && (rhs.replacement == replacement);
|
| - }
|
| - ModifierKey original; // Replace the key with
|
| - ModifierKey replacement; // this key.
|
| -};
|
| -typedef std::vector<ModifierKeyPair> ModifierMap;
|
| -
|
| -// Sets the current keyboard layout to |layout_name|. This function does not
|
| -// change the current mapping of the modifier keys. Returns true on success.
|
| -extern bool (*SetCurrentKeyboardLayoutByName)(const std::string& layout_name);
|
| -
|
| -// Remaps modifier keys. This function does not change the current keyboard
|
| -// layout. Returns true on success.
|
| -// Notice: For now, you can't remap Left Control and Left Alt keys to CapsLock.
|
| -extern bool (*RemapModifierKeys)(const ModifierMap& modifier_map);
|
| -
|
| -// Turns on and off the auto-repeat of the keyboard. Returns true on success.
|
| -extern bool (*SetAutoRepeatEnabled)(bool enabled);
|
| -
|
| -// Sets the auto-repeat rate of the keyboard, initial delay in ms, and repeat
|
| -// interval in ms. Returns true on success.
|
| -extern bool (*SetAutoRepeatRate)(const AutoRepeatRate& rate);
|
| -
|
| -//
|
| -// WARNING: DO NOT USE FUNCTIONS/CLASSES/TYPEDEFS BELOW. They are only for
|
| -// unittests. See the definitions in chromeos_keyboard.cc for details.
|
| -//
|
| -
|
| -// Converts |key| to a modifier key name which is used in
|
| -// /usr/share/X11/xkb/symbols/chromeos.
|
| -inline std::string ModifierKeyToString(ModifierKey key) {
|
| - switch (key) {
|
| - case kSearchKey:
|
| - return "search";
|
| - case kLeftControlKey:
|
| - return "leftcontrol";
|
| - case kLeftAltKey:
|
| - return "leftalt";
|
| - case kVoidKey:
|
| - return "disabled";
|
| - case kCapsLockKey:
|
| - return "capslock";
|
| - case kNumModifierKeys:
|
| - break;
|
| - }
|
| - return "";
|
| -}
|
| -
|
| -// Creates a full XKB layout name like
|
| -// "gb(extd)+chromeos(leftcontrol_disabled_leftalt),us"
|
| -// from modifier key mapping and |layout_name|, such as "us", "us(dvorak)", and
|
| -// "gb(extd)". Returns an empty string on error.
|
| -std::string CreateFullXkbLayoutName(const std::string& layout_name,
|
| - const ModifierMap& modifire_map);
|
| -
|
| -// Returns true if caps lock is enabled.
|
| -// ONLY FOR UNIT TEST. DO NOT USE THIS FUNCTION.
|
| -bool CapsLockIsEnabled();
|
| -
|
| -// Sets the caps lock status to |enable_caps_lock|.
|
| -void SetCapsLockEnabled(bool enabled);
|
| -
|
| -// Returns true if |key| is in |modifier_map| as replacement.
|
| -bool ContainsModifierKeyAsReplacement(
|
| - const ModifierMap& modifier_map, ModifierKey key);
|
| -
|
| -} // namespace chromeos
|
| -
|
| -#endif // CHROMEOS_KEYBOARD_H_
|
|
|