virtual void processEvent( EvtKey &rEvtKey )
 {
     // Only do the action when the key is down
     if( rEvtKey.getKeyState() == EvtKey::kDown )
         var_SetInteger( getIntf()->p_libvlc, "key-pressed",
                          rEvtKey.getModKey() );
 }
Exemple #2
0
void VoutWindow::processEvent( EvtKey &rEvtKey )
{
    // Only do the action when the key is down
    if( rEvtKey.getAsString().find( "key:down") != string::npos )
    {
        vlc_value_t val;
        // Set the key
        val.i_int = rEvtKey.getKey();
        // Set the modifiers
        if( rEvtKey.getMod() & EvtInput::kModAlt )
        {
            val.i_int |= KEY_MODIFIER_ALT;
        }
        if( rEvtKey.getMod() & EvtInput::kModCtrl )
        {
            val.i_int |= KEY_MODIFIER_CTRL;
        }
        if( rEvtKey.getMod() & EvtInput::kModShift )
        {
            val.i_int |= KEY_MODIFIER_SHIFT;
        }

        var_Set( getIntf()->p_libvlc, "key-pressed", val );
    }
}
Exemple #3
0
void TopWindow::processEvent( EvtKey &rEvtKey )
{
    // Forward the event to the focused control, if any
    if( m_pFocusControl )
    {
        m_pFocusControl->handleEvent( rEvtKey );
        return;
    }

    // Only do the action when the key is down
    if( rEvtKey.getAsString().find( "key:down") != string::npos )
    {
        //XXX not to be hardcoded!
        // Ctrl-S = Change skin
        if( (rEvtKey.getMod() & EvtInput::kModCtrl) &&
            rEvtKey.getKey() == 's' )
        {
            CmdDlgChangeSkin cmd( getIntf() );
            cmd.execute();
            return;
        }

        //XXX not to be hardcoded!
        // Ctrl-T = Toggle on top
        if( (rEvtKey.getMod() & EvtInput::kModCtrl) &&
            rEvtKey.getKey() == 't' )
        {
            CmdOnTop cmd( getIntf() );
            cmd.execute();
            return;
        }

        vlc_value_t val;
        // Set the key
        val.i_int = rEvtKey.getKey();
        // Set the modifiers
        if( rEvtKey.getMod() & EvtInput::kModAlt )
        {
            val.i_int |= KEY_MODIFIER_ALT;
        }
        if( rEvtKey.getMod() & EvtInput::kModCtrl )
        {
            val.i_int |= KEY_MODIFIER_CTRL;
        }
        if( rEvtKey.getMod() & EvtInput::kModShift )
        {
            val.i_int |= KEY_MODIFIER_SHIFT;
        }

        var_Set( getIntf()->p_vlc, "key-pressed", val );
    }

    // Always store the modifier, which can be needed for scroll events
    m_currModifier = rEvtKey.getMod();
}
Exemple #4
0
void TopWindow::processEvent( EvtKey &rEvtKey )
{
    // Forward the event to the focused control, if any
    if( m_pFocusControl )
    {
        m_pFocusControl->handleEvent( rEvtKey );
        return;
    }

    // Only do the action when the key is down
    if( rEvtKey.getKeyState() == EvtKey::kDown )
    {
        getIntf()->p_sys->p_dialogs->sendKey( rEvtKey.getModKey() );
    }

    // Always store the modifier, which can be needed for scroll events.
    m_currModifier = rEvtKey.getMod();
}
Exemple #5
0
void TopWindow::processEvent( EvtKey &rEvtKey )
{
    // Forward the event to the focused control, if any
    if( m_pFocusControl )
    {
        m_pFocusControl->handleEvent( rEvtKey );
        return;
    }

    // Only do the action when the key is down
    if( rEvtKey.getKeyState() == EvtKey::kDown )
    {
        //XXX not to be hardcoded!
        // Ctrl-S = Change skin
        if( (rEvtKey.getMod() & EvtInput::kModCtrl) &&
            rEvtKey.getKey() == 's' )
        {
            CmdDlgChangeSkin cmd( getIntf() );
            cmd.execute();
            return;
        }

        //XXX not to be hardcoded!
        // Ctrl-T = Toggle on top
        if( (rEvtKey.getMod() & EvtInput::kModCtrl) &&
            rEvtKey.getKey() == 't' )
        {
            CmdOnTop cmd( getIntf() );
            cmd.execute();
            return;
        }

        var_SetInteger( getIntf()->p_libvlc, "key-pressed",
                        rEvtKey.getModKey() );
    }

    // Always store the modifier, which can be needed for scroll events.
    m_currModifier = rEvtKey.getMod();
}
Exemple #6
0
void VoutWindow::processEvent( EvtKey &rEvtKey )
{
    // Only do the action when the key is down
    if( rEvtKey.getKeyState() == EvtKey::kDown )
        getIntf()->p_sys->p_dialogs->sendKey( rEvtKey.getModKey() );
}