X-Git-Url: http://git.maemo.org/git/?p=qzeecontrol;a=blobdiff_plain;f=xtstadapter.h;h=60914b7cdc099f8564b50f936c74a35035474b0a;hp=6ed1d5db96d2dc081f2e06d46dd13b77ddd75e7b;hb=HEAD;hpb=5ff499fed39e8840c164b15d7d19386640db5c82;ds=sidebyside diff --git a/xtstadapter.h b/xtstadapter.h index 6ed1d5d..60914b7 100644 --- a/xtstadapter.h +++ b/xtstadapter.h @@ -1,3 +1,22 @@ +/* + * Copyright 2012 Ruediger Gad + * + * This file is part of QZeeControl. + * + * QZeeControl is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * QZeeControl is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with QZeeControl. If not, see . + */ + #ifndef XTSTADAPTER_H #define XTSTADAPTER_H @@ -18,12 +37,8 @@ public: signals: public slots: - void sendKeyPress(QString key){ - int keyCode = XKeysymToKeycode(display, XStringToKeysym(key.toLocal8Bit().constData())); - XTestFakeKeyEvent(display, keyCode, true, 0); - XTestFakeKeyEvent(display, keyCode, false, 0); - XFlush(display); - } + void sendKeyPress(QString key); + void sendKey(QString key, bool down); private: Display *display;