Interface IKeyLookup

All Known Implementing Classes:
SWTKeyLookup

public interface IKeyLookup

A facilitiy for converting the formal representation for key strokes (i.e., used in persistence) into real key stroke instances.

Since:
3.1
  • Field Details

  • Method Details

    • formalKeyLookup

      int formalKeyLookup(String name)
      Looks up a single natural key by its formal name, and returns the integer representation for this natural key
      Parameters:
      name - The formal name of the natural key to look-up; must not be null.
      Returns:
      The integer representation of this key. If the natural key cannot be found, then this method returns 0.
    • formalKeyLookupInteger

      Integer formalKeyLookupInteger(String name)
      Looks up a single natural key by its formal name, and returns the integer representation for this natural key
      Parameters:
      name - The formal name of the natural key to look-up; must not be null.
      Returns:
      The integer representation of this key. If the natural key cannot be found, then this method returns 0.
    • formalModifierLookup

      int formalModifierLookup(String name)
      Looks up a single modifier key by its formal name, and returns the integer representation for this modifier key
      Parameters:
      name - The formal name of the modifier key to look-up; must not be null.
      Returns:
      The integer representation of this key. If the modifier key cannot be found, then this method returns 0.
    • formalNameLookup

      String formalNameLookup(int key)
      Looks up a key value, and returns the formal string representation for that key
      Parameters:
      key - The key to look-up.
      Returns:
      The formal string representation of this key. If this key cannot be found, then it is simply the character corresponding to that integer value.
    • getAlt

      int getAlt()
      Returns the integer representation of the ALT key.
      Returns:
      The ALT key
    • getCommand

      int getCommand()
      Returns the integer representation of the COMMAND key.
      Returns:
      The COMMAND key
    • getCtrl

      int getCtrl()
      Returns the integer representation of the CTRL key.
      Returns:
      The CTRL key
    • getShift

      int getShift()
      Returns the integer representation of the SHIFT key.
      Returns:
      The SHIFT key
    • isModifierKey

      boolean isModifierKey(int key)
      Returns whether the given key is a modifier key.
      Parameters:
      key - The integer value of the key to check.
      Returns:
      true if the key is one of the modifier keys; false otherwise.