/*****************************************************************************
 * $LastChangedDate: 2009-11-21 23:04:57 -0500 (Sat, 21 Nov 2009) $
 * @file
 * @author  Jim E. Brooks  http://www.palomino3d.org
 * @brief   Keyboard event struct (system-neutral).
 *//*
 * LEGAL:   COPYRIGHT (C) 2009 JIM E. BROOKS
 *          THIS SOURCE CODE IS RELEASED UNDER THE TERMS
 *          OF THE GNU GENERAL PUBLIC LICENSE VERSION 2 (GPL 2).
 *****************************************************************************/

#ifndef INPUT_EVENT_KEYBOARD_HH
#define INPUT_EVENT_KEYBOARD_HH 1

namespace input {

////////////////////////////////////////////////////////////////////////////////
/// @brief Keyboard event (system-neutral).
///
struct KeyboardEvent
{
    KeyboardEvent( void )
    : mKey(0), mPress(false), mShift(false), mCtrl(false), mAlt(false)
    { }

    KeyboardEvent( int key, bool press, bool shift, bool ctrl, bool alt )
    : mKey(key), mPress(press), mShift(shift), mCtrl(ctrl), mAlt(alt)
    { }

    bool IfModifier( void ) const { return mShift or mCtrl or mAlt; }

    int     mKey;       ///< which key
    bool    mPress;     ///< true if key was pressed, else key was released
    bool    mShift;     ///< true if Shift was down
    bool    mCtrl;      ///< true if Ctrl was down
    bool    mAlt;       ///< true if Alt was down
};

} // namespace input

#endif // INPUT_EVENT_KEYBOARD_HH
