1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Changed a couple of unicode characters used for OSX keypress symbols.

This commit is contained in:
jules 2013-08-12 21:21:44 +01:00
parent e8d0c6d024
commit c4affa2fb3
2 changed files with 16 additions and 41 deletions

View file

@ -23,28 +23,22 @@
*/
KeyPress::KeyPress() noexcept
: keyCode (0),
textCharacter (0)
: keyCode (0), textCharacter (0)
{
}
KeyPress::KeyPress (const int code, ModifierKeys m,
const juce_wchar textChar) noexcept
: keyCode (code),
mods (m),
textCharacter (textChar)
KeyPress::KeyPress (int code, ModifierKeys m, juce_wchar textChar) noexcept
: keyCode (code), mods (m), textCharacter (textChar)
{
}
KeyPress::KeyPress (const int code) noexcept
: keyCode (code),
textCharacter (0)
: keyCode (code), textCharacter (0)
{
}
KeyPress::KeyPress (const KeyPress& other) noexcept
: keyCode (other.keyCode),
mods (other.mods),
: keyCode (other.keyCode), mods (other.mods),
textCharacter (other.textCharacter)
{
}
@ -188,13 +182,14 @@ namespace KeyPressHelpers
{ "command + ", 0x2318 },
{ "option + ", 0x2325 },
{ "ctrl + ", 0x2303 },
{ "return", 0x23ce },
{ "return", 0x21b5 },
{ "cursor left", 0x2190 },
{ "cursor right", 0x2192 },
{ "cursor up", 0x2191 },
{ "cursor down", 0x2193 },
{ "backspace", 0x232b },
{ "delete", 0x2326 }
{ "delete", 0x2326 },
{ "spacebar", 0x2423 }
};
#endif
}
@ -258,23 +253,14 @@ String KeyPress::getTextDescription() const
if (textCharacter == '/')
return "/";
if (mods.isCtrlDown())
desc << "ctrl + ";
if (mods.isShiftDown())
desc << "shift + ";
if (mods.isCtrlDown()) desc << "ctrl + ";
if (mods.isShiftDown()) desc << "shift + ";
#if JUCE_MAC
if (mods.isAltDown())
desc << "option + ";
// only do this on the mac, because on Windows ctrl and command are the same,
// and this would get confusing
if (mods.isCommandDown())
desc << "command + ";
if (mods.isAltDown()) desc << "option + ";
if (mods.isCommandDown()) desc << "command + ";
#else
if (mods.isAltDown())
desc << "alt + ";
if (mods.isAltDown()) desc << "alt + ";
#endif
for (int i = 0; i < numElementsInArray (KeyPressHelpers::translations); ++i)

View file

@ -22,20 +22,9 @@
==============================================================================
*/
ModifierKeys::ModifierKeys() noexcept
: flags (0)
{
}
ModifierKeys::ModifierKeys (const int flags_) noexcept
: flags (flags_)
{
}
ModifierKeys::ModifierKeys (const ModifierKeys& other) noexcept
: flags (other.flags)
{
}
ModifierKeys::ModifierKeys() noexcept : flags (0) {}
ModifierKeys::ModifierKeys (int rawFlags) noexcept : flags (rawFlags) {}
ModifierKeys::ModifierKeys (const ModifierKeys& other) noexcept : flags (other.flags) {}
ModifierKeys& ModifierKeys::operator= (const ModifierKeys other) noexcept
{