예제 #1
0
void ShortcutsPlugin::applyKeys()
{
    applyKeys(MenuMain);
    applyKeys(MenuGroup);
    applyKeys(MenuContact);
    applyKeys(MenuStatus);
}
예제 #2
0
ShortcutsPlugin::ShortcutsPlugin(unsigned base, Buffer *config)
        : Plugin(base)
{
    load_data(shortcutsData, &data, config);
#ifdef WIN32
    m_bInit = false;
    init();
#else
    applyKeys();
#endif
}
예제 #3
0
ShortcutsPlugin::ShortcutsPlugin(unsigned base, Buffer *config)
    : Plugin(base)
{
    load_data(shortcutsData, &data, config);
#ifdef WIN32
    m_bInit = false;
    init();
#else
    applyKeys();
#ifndef USE_KDE
    oldFilter = qt_set_x11_event_filter(X11EventFilter);
#endif
#endif
}
예제 #4
0
void ShortcutsPlugin::init()
{
    if (m_bInit)
        return;
    QWidget *main = getMainWindow();
    if (main){
        if (IsWindowUnicode(main->winId())){
            oldProc = (WNDPROC)SetWindowLongW(main->winId(), GWL_WNDPROC, (LONG)keysWndProc);
        }else{
            oldProc = (WNDPROC)SetWindowLongA(main->winId(), GWL_WNDPROC, (LONG)keysWndProc);
        }
        m_bInit = true;
        applyKeys();
    }
}
void keyMouse::update(){
	if(firstRun){
		buildLookupTable();
		firstRun = false;
	}
	//Retrieve the button and motion data from the uC
	map.getData(&buttons, &moData);
	//Press or release any buttons given by the buttons vector
	//This includes any "virtual" buttons from analog values
	applyKeys();
	int x;
	int y;
	//Process the motion input for moving the mouse
	motion.processInput(&moData, &x, &y);
	//Apply the mouse movement if enabled
	if(!moData.motionDisable){
		moveMouse(x,y);
	}
}