First commit

This commit is contained in:
2026-08-25 10:37:57 +08:00
commit b3b8a40f77
1601 changed files with 275999 additions and 0 deletions
+43
View File
@@ -0,0 +1,43 @@
#include "moveinput.h"
#include "ui_moveinput.h"
#include <QWSServer>
MoveInput::MoveInput(QWidget *parent) :
QWidget(parent,(Qt::WindowStaysOnTopHint | Qt::FramelessWindowHint | Qt::Tool)),
ui(new Ui::MoveInput)
{
ui->setupUi(this);
connect(ui->Key_left,SIGNAL(pressed()),this,SLOT(onKeyLeftPressed()));
connect(ui->Key_right,SIGNAL(pressed()),this,SLOT(onKeyRightPressed()));
connect(ui->Key_up,SIGNAL(pressed()),this,SLOT(onKeyUpPressed()));
connect(ui->Key_down,SIGNAL(pressed()),this,SLOT(onKeyDownPressed()));
}
MoveInput::~MoveInput()
{
delete ui;
}
void MoveInput::onKeyLeftPressed(){
#ifndef Q_OS_WIN32
QWSServer::sendKeyEvent(0,Qt::Key_Left,Qt::NoModifier,true,false); //向系统发送键盘事件
#endif
}
void MoveInput::onKeyRightPressed(){
#ifndef Q_OS_WIN32
QWSServer::sendKeyEvent(0,Qt::Key_Right,Qt::NoModifier,true,false); //向系统发送键盘事件
#endif
}
void MoveInput::onKeyUpPressed(){
#ifndef Q_OS_WIN32
QWSServer::sendKeyEvent(0,Qt::Key_Up,Qt::NoModifier,true,false); //向系统发送键盘事件
#endif
}
void MoveInput::onKeyDownPressed(){
#ifndef Q_OS_WIN32
QWSServer::sendKeyEvent(0,Qt::Key_Down,Qt::NoModifier,true,false); //向系统发送键盘事件
#endif
}