Logo Search packages:      
Sourcecode: blender version File versions

GHOST_TSuccess GHOST_SystemCarbon::getModifierKeys ( GHOST_ModifierKeys keys  )  const [virtual]

Returns the state of all modifier keys.

Parameters:
keys The state of all modifier keys (true == pressed).
Returns:
Indication of success.

Implements GHOST_System.

Definition at line 504 of file GHOST_SystemCarbon.cpp.

References GHOST_ModifierKeys::set().

{
    UInt32 modifiers = ::GetCurrentKeyModifiers();

    keys.set(GHOST_kModifierKeyCommand, (modifiers & cmdKey) ? true : false);
    keys.set(GHOST_kModifierKeyLeftAlt, (modifiers & optionKey) ? true : false);
    keys.set(GHOST_kModifierKeyLeftShift, (modifiers & shiftKey) ? true : false);
    keys.set(GHOST_kModifierKeyLeftControl, (modifiers & controlKey) ? true : false);
      
    return GHOST_kSuccess;
}


Generated by  Doxygen 1.6.0   Back to index