diff --git a/src/juce_appframework/gui/components/controls/juce_TextEditor.cpp b/src/juce_appframework/gui/components/controls/juce_TextEditor.cpp index 0235ecf7fe..ae0995e444 100644 --- a/src/juce_appframework/gui/components/controls/juce_TextEditor.cpp +++ b/src/juce_appframework/gui/components/controls/juce_TextEditor.cpp @@ -1883,7 +1883,7 @@ bool TextEditor::keyPressed (const KeyPress& key) moveCursorTo (getTotalNumChars(), false); moveCursorTo (0, true); } - else if (key.isKeyCode (KeyPress::returnKey)) + else if (key == KeyPress::returnKey) { if (! isReadOnly()) { diff --git a/src/juce_appframework/gui/components/keyboard/juce_KeyPress.h b/src/juce_appframework/gui/components/keyboard/juce_KeyPress.h index b9bda68aed..e3542df8b9 100644 --- a/src/juce_appframework/gui/components/keyboard/juce_KeyPress.h +++ b/src/juce_appframework/gui/components/keyboard/juce_KeyPress.h @@ -57,8 +57,8 @@ public: /** Creates a KeyPress for a key and some modifiers. e.g. - CTRL+C would be: KeyPress ('c', Modifiers::ctrlModifier) - SHIFT+Escape would be: KeyPress (KeyPress::escapeKey, Modifiers::shiftModifier) + CTRL+C would be: KeyPress ('c', ModifierKeys::ctrlModifier) + SHIFT+Escape would be: KeyPress (KeyPress::escapeKey, ModifierKeys::shiftModifier) @param keyCode a code that represents the key - this value must be one of special constants listed in this class, or an @@ -110,7 +110,7 @@ public: /** Returns the key modifiers. - @see Modifiers + @see ModifierKeys */ const ModifierKeys getModifiers() const throw() { return mods; }