Package megamek.client.ui.util
Enum Class KeyCommandBind
- All Implemented Interfaces:
- Serializable,- Comparable<KeyCommandBind>,- Constable
This enum is a collection of commands that can be bound to a particular key.
- 
Nested Class SummaryNested classes/interfaces inherited from class java.lang.EnumEnum.EnumDesc<E extends Enum<E>>
- 
Enum Constant SummaryEnum ConstantsEnum ConstantDescriptionUsed to cancel moves/fires/chatterboxCenter on the currently selected unit.Toggles between Jumping and Walk/Run, also acts as a reset when a unit cannot jump
- 
Field SummaryFieldsModifier and TypeFieldDescriptionThe command associated with this binding.booleanDefines if an action is exclusive, which means that only one CommandAction will be performed for each key press.booleanWhen true, this keybind is used by the CommonMenuBar.booleanFor a repeatable bind, when the key is pressed the action will be added to a timer and repeated until the key is released.intDefines the keycode for the command, e.g.intintModifiers to the key code, such as InputEvent.CTRL_DOWN_MASK.int
- 
Method SummaryModifier and TypeMethodDescriptionstatic KeyCommandBindgetBindByCmd(String cmd) Returns the bind identified by the given cmd or null if there is no such bind.static List<KeyCommandBind>getBindByKey(int keycode, int modifiers) Returns a list of binds using the given keycode and modifier.static Stringreturns formatted mod + key for displaystatic KeyStrokekeyStroke(KeyCommandBind bind) Returns a KeyStroke for a given KeyCommandBind.static KeyCommandBindReturns the enum constant of this class with the specified name.static KeyCommandBind[]values()Returns an array containing the constants of this enum class, in the order they are declared.
- 
Enum Constant Details- 
SCROLL_NORTH
- 
SCROLL_SOUTH
- 
SCROLL_EAST
- 
SCROLL_WEST
- 
TOGGLE_CHAT
- 
TOGGLE_CHAT_CMD
- 
DEPLOY_TURN_UNIT
- 
MOVE_STEP_FORWARD
- 
MOVE_STEP_BACKWARD
- 
TURN_LEFT
- 
TURN_RIGHT
- 
TWIST_LEFT
- 
TWIST_RIGHT
- 
FIRE
- 
NEXT_WEAPON
- 
PREV_WEAPON
- 
NEXT_UNIT
- 
PREV_UNIT
- 
NEXT_TARGET
- 
PREV_TARGET
- 
NEXT_TARGET_VALID
- 
PREV_TARGET_VALID
- 
NEXT_TARGET_NO_ALLIES
- 
PREV_TARGET_NO_ALLIES
- 
NEXT_TARGET_VALID_NO_ALLIES
- 
PREV_TARGET_VALID_NO_ALLIES
- 
PHYS_PUNCH
- 
PHYS_KICK
- 
PHYS_PUSH
- 
VIEW_ACTING_UNIT
- 
UNDO_LAST_STEP
- 
UNDO
- 
REDO
- 
CENTER_ON_SELECTEDCenter on the currently selected unit.
- 
AUTO_ARTY_DEPLOYMENT_ZONE
- 
CANCELUsed to cancel moves/fires/chatterbox
- 
DONE
- 
DONE_NO_ACTION
- 
UD_GENERAL
- 
UD_PILOT
- 
UD_ARMOR
- 
UD_WEAPONS
- 
UD_SYSTEMS
- 
UD_EXTRAS
- 
TOGGLE_MOVE_MODEToggles between Jumping and Walk/Run, also acts as a reset when a unit cannot jump
- 
MOVE_BACKUP
- 
MOVE_GO_PRONE
- 
MOVE_GETUP
- 
TOGGLE_CONVERSION_MODE
- 
PREV_MODE
- 
NEXT_MODE
- 
PAUSE
- 
UNPAUSE
- 
REPORT_KEY_NEXT
- 
REPORT_KEY_PREV
- 
REPORT_KEY_SELECT_NEXT
- 
REPORT_KEY_SELECT_PREVIOUS
- 
REPORT_FILTER_KEY_SELECT_NEXT
- 
REPORT_KEY_FILTER
- 
TOGGLE_ISO
- 
MOVE_ENVELOPE
- 
FIELD_FIRE
- 
DRAW_LABELS
- 
HEX_COORDS
- 
MINIMAP
- 
LOS_SETTING
- 
UNIT_DISPLAY
- 
UNIT_OVERVIEW
- 
KEY_BINDS
- 
PLANETARY_CONDITIONS
- 
TURN_DETAILS
- 
CLIENT_SETTINGS
- 
INC_GUI_SCALE
- 
DEC_GUI_SCALE
- 
ROUND_REPORT
- 
ZOOM_IN
- 
ZOOM_OUT
- 
ZOOM_OVERVIEW_TOGGLE
- 
QUICK_LOAD
- 
QUICK_SAVE
- 
LOCAL_LOAD
- 
LOCAL_SAVE
- 
REPLACE_PLAYER
- 
MOD_ENVELOPE
- 
SENSOR_RANGE
- 
UNDO_SINGLE_STEP
- 
FORCE_DISPLAY
- 
EXTEND_TURN_TIMER
- 
BOT_COMMANDS
 
- 
- 
Field Details- 
cmdThe command associated with this binding.
- 
keypublic int keyDefines the keycode for the command, e.g. KeyEvent.VK_X.
- 
keyDefaultpublic int keyDefault
- 
modifierspublic int modifiersModifiers to the key code, such as InputEvent.CTRL_DOWN_MASK.
- 
modifiersDefaultpublic int modifiersDefault
- 
isExclusivepublic boolean isExclusiveDefines if an action is exclusive, which means that only one CommandAction will be performed for each key press. The CommandAction that is performed will be the first one encountered. Exclusive binds can't share their key with other binds.
- 
isRepeatablepublic boolean isRepeatableFor a repeatable bind, when the key is pressed the action will be added to a timer and repeated until the key is released.
- 
isMenuBarpublic boolean isMenuBarWhen true, this keybind is used by the CommonMenuBar. Binding it with the MegaMekController like the other keybinds is not necessary (and will not work, as the command will not be recognized in this way).
 
- 
- 
Method Details- 
valuesReturns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
 
- 
valueOfReturns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
- name- the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
- IllegalArgumentException- if this enum class has no constant with the specified name
- NullPointerException- if the argument is null
 
- 
getBindByKeyReturns a list of binds using the given keycode and modifier. Only lists those that are not used by the CommonMenuBar!
- 
getBindByCmdReturns the bind identified by the given cmd or null if there is no such bind.
- 
keyStrokeReturns a KeyStroke for a given KeyCommandBind.
- 
getDescreturns formatted mod + key for display
 
-