ModifierKeys

class HPS::ModifierKeys

Various modifier keys that could be active for an InputEvent.

Public Functions

inline bool Alt() const

Indicates whether any alt key (right or left) is active.

Returns

true if any alt key is active, false otherwise.

inline void Alt(bool in_state)

Sets the state of the alt key modifier

Parameters

in_state – true if at least one alt key (right or left) is active, false otherwise.

inline bool CapsLock() const

Indicates whether the caps lock button is active

Returns

true if the caps lock key is active, false otherwise.

inline void CapsLock(bool in_state)

Sets the state of the caps lock key modifier

Parameters

in_state – true if the caps lock key is active, false otherwise.

inline bool Control() const

Indicates whether any control key (right or left) is active.

Returns

true if any control key is active, false otherwise.

inline void Control(bool in_state)

Sets the state of the control key modifier

Parameters

in_state – true if at least one control key (right or left) is active, false otherwise.

inline bool Equals(ModifierKeys const &in_that) const

Check if the source object is equivalent to this object.

Parameters

in_that – The source object to compare to this object.

Returns

true if the objects are equivalent, false otherwise.

inline bool HasAll(ModifierKeys const &in_keys) const

Indicates whether all modifiers of the input parameter are present in this object.

Parameters

in_keys – A collection of modifiers to check against this object.

Returns

true if all of the input modifiers are active, false otherwise.

inline bool HasAny(ModifierKeys const &in_keys) const

Indicates whether any modifiers of the input parameter are present in this object.

Parameters

in_keys – A collection of modifiers to check against this object.

Returns

true if any of the modifiers are active, false otherwise.

inline bool LeftAlt() const

Indicates whether the left alt button is active

Returns

true if the left alt key is active, false otherwise.

inline void LeftAlt(bool in_state)

Sets the state of the left alt key modifier

Parameters

in_state – true if the left alt key is active, false otherwise.

inline bool LeftControl() const

Indicates whether the left control button is active

Returns

true if the left control key is active, false otherwise.

inline void LeftControl(bool in_state)

Sets the state of the left control key modifier

Parameters

in_state – true if the left control key is active, false otherwise.

inline bool LeftMeta() const

Indicates whether the left meta button is active

Returns

true if the left meta key is active, false< /span> otherwise.

inline void LeftMeta(bool in_state)

Sets the state of the left meta key modifier

Parameters

in_state – true if the left meta key is active, false otherwise.

inline bool LeftShift() const

Indicates whether the left shift button is active

Returns

true if the left shift key is active, false otherwise.

inline void LeftShift(bool in_state)

Sets the state of the left shift key modifier

Parameters

in_state – true if the left shift key is active, false otherwise.

inline bool Meta() const

Indicates whether any meta key (right or left) is active.

Returns

true if any meta key is active, false otherwise.

inline void Meta(bool in_state)

Sets the state of the meta key modifier

Parameters

in_state – true if at least one meta key (right or left) is active, false otherwise.

inline ModifierKeys()

The default constructor creates a ModifierKeys object with no modifiers active.

inline bool None() const

Indicates whether no modifiers are active.

Returns

true if no modifier keys are active, false otherwise.

inline bool NumLock() const

Indicates whether the num lock button is active

Returns

true if the num lock key is active, false otherwise.

inline void NumLock(bool in_state)

Sets the state of the num lock key modifier

Parameters

in_state – true if the num lock key is active, false otherwise.

inline bool operator!=(ModifierKeys const &in_that) const

Check if the source object is not equivalent to this object.

Parameters

in_that – The source object to compare to this object.

Returns

true if the objects are not equivalent, false otherwise.

inline ModifierKeys operator+(ModifierKeys const &in_modifiers_to_merge)

Merges the buttons from two ModifierKeys objects.

Parameters

in_modifiers_to_merge – A collection of modifiers to merge with the modifiers of this object.

Returns

A new ModifierKeys object.

inline ModifierKeys &operator+=(ModifierKeys const &in_modifiers_to_merge)

Merges the modifiers from another ModifierKeys object into this one.

Parameters

in_modifiers_to_merge – A collection of modifiers to merge with the modifiers of this object.

Returns

A reference to this object.

inline ModifierKeys operator-(ModifierKeys const &in_modifiers_to_remove)

Creates a new ModifierKeys object representing the removal of the modifiers of another ModifierKeys object from this object.

Parameters

in_modifiers_to_remove – A collection of modifiers to remove from those of this object.

Returns

A new ModifierKeys object.

inline ModifierKeys &operator-=(ModifierKeys const &in_modifiers_to_remove)

Removes the modifiers of another ModifierKeys object from this one.

Parameters

in_modifiers_to_remove – A collection of modifiers to remove from those of this object.

Returns

A reference to this object.

inline bool operator==(ModifierKeys const &in_that) const

Check if the source object is equivalent to this object.

Parameters

in_that – The source object to compare to this object.

Returns

true if the objects are equivalent, false otherwise.

inline bool RightAlt() const

Indicates whether the right alt button is active

Returns

true if the right alt key is active, false otherwise.

inline void RightAlt(bool in_state)

Sets the state of the right alt key modifier

Parameters

in_state – true if the right alt key is active, false otherwise.

inline bool RightControl() const

Indicates whether the right control button is active

Returns

true if the right control key is active, false otherwise.

inline void RightControl(bool in_state)

Sets the state of the right control key modifier

Parameters

in_state – true if the right control key is active, false otherwise.

inline bool RightMeta() const

Indicates whether the right meta button is active

Returns

true if the right meta key is active, false< /span> otherwise.

inline void RightMeta(bool in_state)

Sets the state of the right meta key modifier

Parameters

in_state – true if the right meta key is active, false otherwise.

inline bool RightShift() const

Indicates whether the right shift button is active

Returns

true if the right shift key is active, false otherwise.

inline void RightShift(bool in_state)

Sets the state of the right shift key modifier

Parameters

in_state – true if the right shift key is active, false otherwise.

inline bool ScrollLock() const

Indicates whether the scroll lock button is active

Returns

true if the scroll lock key is active, false otherwise.

inline void ScrollLock(bool in_state)

Sets the state of the scroll lock key modifier

Parameters

in_state – true if the scroll lock key is active, false otherwise.

inline bool Shift() const

Indicates whether any shift key (right or left) is active.

Returns

true if any shift key is active, false otherwise.

inline void Shift(bool in_state)

Sets the state of the shift key modifier

Parameters

in_state – true if at least one shift key (right or left) is active, false otherwise.

Public Static Functions

static inline ModifierKeys KeyAlt()

Creates a new ModifierKeys object with the alt key active. Use this function if your application does not need to differentiate between left and right alt buttons

Returns

A new ModifierKeys object with the alt key active.

static inline ModifierKeys KeyCapsLock()

Creates a new ModifierKeys object with the caps lock key active.

Returns

A new ModifierKeys object with the caps lock key active.

static inline ModifierKeys KeyControl()

Creates a new ModifierKeys object with the control key active. Use this function if your application does not need to differentiate between left and right control buttons

Returns

A new ModifierKeys object with the control key active.

static inline ModifierKeys KeyLeftAlt()

Creates a new ModifierKeys object with the left alt key active.

Returns

A new ModifierKeys object with the left alt key active.

static inline ModifierKeys KeyLeftControl()

Creates a new ModifierKeys object with the left control key active.

Returns

A new ModifierKeys object with the left control key active.

static inline ModifierKeys KeyLeftMeta()

Creates a new ModifierKeys object with the left meta key active.

Returns

A new ModifierKeys object with the left meta key active.

static inline ModifierKeys KeyLeftShift()

Creates a new ModifierKeys object with the left shift key active.

Returns

A new ModifierKeys object with the left shift key active.

static inline ModifierKeys KeyMeta()

Creates a new ModifierKeys object with the meta key active. Use this function if your application does not need to differentiate between left and right meta buttons

Returns

A new ModifierKeys object with the meta key active.

static inline ModifierKeys KeyNumLock()

Creates a new ModifierKeys object with the num lock key active.

Returns

A new ModifierKeys object with the num lock key active.

static inline ModifierKeys KeyRightAlt()

Creates a new ModifierKeys object with the right alt key active.

Returns

A new ModifierKeys object with the right alt key active.

static inline ModifierKeys KeyRightControl()

Creates a new ModifierKeys object with the right control key active.

Returns

A new ModifierKeys object with the right control key active.

static inline ModifierKeys KeyRightMeta()

Creates a new ModifierKeys object with the right meta key active.

Returns

A new ModifierKeys object with the right meta key active.

static inline ModifierKeys KeyRightShift()

Creates a new ModifierKeys object with the right shift key active.

Returns

A new ModifierKeys object with the right shift key active.

static inline ModifierKeys KeyScrollLock()

Creates a new ModifierKeys object with the scroll lock key active.

Returns

A new ModifierKeys object with the scroll lock key active.

static inline ModifierKeys KeyShift()

Creates a new ModifierKeys object with the shift key active. Use this function if your application does not need to differentiate between left and right shift buttons

Returns

A new ModifierKeys object with the shift key active.