1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39
   40
   41
   42
   43
   44
   45
   46
   47
   48
   49
   50

ash / public / mojom / accelerator_configuration.mojom [blame]

// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

module ash.mojom;

// This file provides shared enums related to accelerator configurations and
// their operations.

// Enum of different states as a result from attempting to modify an
// accelerator.
enum AcceleratorConfigResult {
  // No errors.
  kSuccess = 0,
  // Error - cannot modify a locked action.
  kActionLocked = 1,
  // Error - cannot modify a locked accelerator.
  kAcceleratorLocked = 2,
  // Error - an existing action already contains the accelerator.
  kConflict = 3,
  // Error - an existing action already contains the accelerator, but can be
  // overridden.
  kConflictCanOverride = 4,
  // Error - action ID cannot be found, indicating that the shortcut does not
  // exist.
  kNotFound = 5,
  // Error - the key is not allowed to be used as an accelerator activation key.
  kKeyNotAllowed = 6,
  // Error - accelerator must have a modifier with key.
  kMissingModifier = 7,
  // Error - shift cannot be the only modifier.
  kShiftOnlyNotAllowed = 8,
  // Error - reached maximum number of allowed accelerators for the action.
  kMaximumAcceleratorsReached = 9,
  // Success - Restoring an action was successful but the default accelerators
  // have existing conflicts.
  kRestoreSuccessWithConflicts = 10,
  // Warning - The user added accelerator does not have the Search/Meta modifier
  // but it's not necessarily an error. This state warns users of the downsides
  // of using a non-search accelerator.
  kNonSearchAcceleratorWarning = 11,
  // Error - search + function key is not allowed.
  kSearchWithFunctionKeyNotAllowed = 12,
  // Error - reserved key is not allowed.
  kReservedKeyNotAllowed = 13,
  // Error - non-standard key is used with the search modifier.
  kNonStandardWithSearch = 14,
  // Error - quick insert key is not allowed.
  kBlockQuickInsert = 15,
};