76 explicit KeyPress (
int keyCode)
noexcept;
85 bool operator== (
const KeyPress& other)
const noexcept;
88 bool operator!= (
const KeyPress& other)
const noexcept;
91 bool operator== (
int keyCode)
const noexcept;
94 bool operator!= (
int keyCode)
const noexcept;
102 bool isValid() const noexcept {
return keyCode != 0; }
132 bool isKeyCode (
int keyCodeToCompare)
const noexcept {
return keyCode == keyCodeToCompare; }
146 static KeyPress createFromDescription (
const String& textVersion);
155 String getTextDescription()
const;
162 String getTextDescriptionWithIcons()
const;
172 bool isCurrentlyDown()
const;
179 static bool isKeyCurrentlyDown (
int keyCode);
Represents a key press, including any modifier keys that are needed.
static const int numberPadMultiply
key-code for the multiply sign on the numeric keypad.
static const int F32Key
key-code for the F32 key
static const int numberPad8
key-code for the 8 on the numeric keypad.
static const int playKey
key-code for a multimedia 'play' key, (not all keyboards will have one)
static const int numberPad6
key-code for the 6 on the numeric keypad.
static const int F35Key
key-code for the F35 key
static const int F9Key
key-code for the F9 key
static const int F14Key
key-code for the F14 key
static const int F11Key
key-code for the F11 key
static const int homeKey
key-code for the home key
static const int numberPad2
key-code for the 2 on the numeric keypad.
static const int numberPad4
key-code for the 4 on the numeric keypad.
static const int F24Key
key-code for the F24 key
static const int numberPadEquals
key-code for the equals key on the numeric keypad.
static const int upKey
key-code for the cursor-up key
KeyPress()=default
Creates an (invalid) KeyPress.
static const int numberPad7
key-code for the 7 on the numeric keypad.
static const int F16Key
key-code for the F16 key
static const int F19Key
key-code for the F19 key
static const int fastForwardKey
key-code for a multimedia 'fast-forward' key, (not all keyboards will have one)
static const int F20Key
key-code for the F20 key
static const int stopKey
key-code for a multimedia 'stop' key, (not all keyboards will have one)
static const int numberPadSeparator
key-code for the comma on the numeric keypad.
static const int numberPad5
key-code for the 5 on the numeric keypad.
static const int F6Key
key-code for the F6 key
static const int endKey
key-code for the end key
static const int F1Key
key-code for the F1 key
static const int tabKey
key-code for the tab key
static const int F21Key
key-code for the F21 key
static const int numberPad0
key-code for the 0 on the numeric keypad.
juce_wchar getTextCharacter() const noexcept
Returns the character that is associated with this keypress.
static const int numberPad9
key-code for the 9 on the numeric keypad.
static const int numberPadAdd
key-code for the add sign on the numeric keypad.
static const int F33Key
key-code for the F33 key
bool isKeyCode(int keyCodeToCompare) const noexcept
Checks whether the KeyPress's key is the same as the one provided, without checking the modifiers.
static const int rightKey
key-code for the cursor-right key
static const int F17Key
key-code for the F17 key
static const int rewindKey
key-code for a multimedia 'rewind' key, (not all keyboards will have one)
static const int F27Key
key-code for the F27 key
static const int deleteKey
key-code for the delete key (not backspace)
bool isValid() const noexcept
Returns true if this is a valid KeyPress.
static const int insertKey
key-code for the insert key
static const int F31Key
key-code for the F31 key
static const int F4Key
key-code for the F4 key
static const int F2Key
key-code for the F2 key
static const int F7Key
key-code for the F7 key
static const int F25Key
key-code for the F25 key
static const int F30Key
key-code for the F30 key
static const int F5Key
key-code for the F5 key
static const int F8Key
key-code for the F8 key
static const int F22Key
key-code for the F22 key
ModifierKeys getModifiers() const noexcept
Returns the key modifiers.
static const int F10Key
key-code for the F10 key
KeyPress(const KeyPress &)=default
Creates a copy of another KeyPress.
static const int downKey
key-code for the cursor-down key
static const int numberPadDelete
key-code for the delete key on the numeric keypad.
int getKeyCode() const noexcept
Returns the key code itself.
static const int numberPad3
key-code for the 3 on the numeric keypad.
static const int F15Key
key-code for the F15 key
static const int spaceKey
key-code for the space bar
static const int F3Key
key-code for the F3 key
static const int F13Key
key-code for the F13 key
static const int F26Key
key-code for the F26 key
static const int escapeKey
key-code for the escape key
static const int numberPadDivide
key-code for the divide sign on the numeric keypad.
static const int returnKey
key-code for the return key
static const int F23Key
key-code for the F23 key
static const int F29Key
key-code for the F29 key
static const int leftKey
key-code for the cursor-left key
static const int F34Key
key-code for the F34 key
~KeyPress()=default
Destructor.
static const int F12Key
key-code for the F12 key
static const int F18Key
key-code for the F18 key
static const int pageUpKey
key-code for the page-up key
static const int F28Key
key-code for the F28 key
static const int pageDownKey
key-code for the page-down key
static const int numberPad1
key-code for the 1 on the numeric keypad.
static const int numberPadDecimalPoint
key-code for the decimal point sign on the numeric keypad.
static const int backspaceKey
key-code for the backspace key
static const int numberPadSubtract
key-code for the subtract sign on the numeric keypad.
Represents the state of the mouse buttons and modifier keys.
#define JUCE_LEAK_DETECTOR(OwnerClass)
This macro lets you embed a leak-detecting object inside a class.
wchar_t juce_wchar
A platform-independent 32-bit unicode character type.