Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 新增Ctrl + 鼠标点击移动光标功能 #341

Merged
merged 3 commits into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions 3rdparty/terminalwidget/lib/Emulation.h
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,16 @@ public slots:
*/
virtual void sendString(const char *string, int length = -1) = 0;

/**
* Send Cursor Change
*
* @param count count < 0
* cursor left count times
* count > 0
* cursor right count times
*/
virtual void sendCursor(int count) = 0;

/**
* Processes an incoming stream of characters. receiveData() decodes the incoming
* character buffer using the current codec(), and then calls receiveChar() for
Expand Down
2 changes: 2 additions & 0 deletions 3rdparty/terminalwidget/lib/Session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,8 @@ void Session::addView(TerminalDisplay * widget)
SLOT(sendKeyEvent(QKeyEvent *)) );
connect( widget , SIGNAL(mouseSignal(int,int,int,int)) , _emulation ,
SLOT(sendMouseEvent(int,int,int,int)) );
connect(widget, SIGNAL(changedCursonPosition(int)), _emulation,
SLOT(sendCursor(int)));
// 先判断是否有远程连接,若有,则连接远程
// connect(widget, SIGNAL(sendStringToEmu(const char *)), _emulation, SLOT(sendString(const char *)));

Expand Down
Loading
Loading