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() );
 }
Пример #2
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();
}
Пример #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.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();
}
Пример #4
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() );
}