How do I send CTRL +V events to Linux
-
-
https://unix.stackexchange.com/questions/192462/how-to-remotely-send-a-keypress-to-an-x11-application
Use QProcess to send out a command from your qt app?
xdotool key ctrl+V -
Due to business needs, in the cross-platform qt is used to implement the cursor paste string, can be used in the c # System. Windows. Forms. The SendKeys. SendWait (" ^ v "); , but QT did not find a suitable solution. Please give me a hand
-
https://unix.stackexchange.com/questions/192462/how-to-remotely-send-a-keypress-to-an-x11-application
Use QProcess to send out a command from your qt app?
xdotool key ctrl+V -
@pickupy
Hello and welcome.We understand that English may not be your first language, but this question is difficult to comprehend. Send a key press? Where? To a window within your Qt application, to another window in a different process with a UI?
@JonB Thank you very much. As you said, English is not my mother tongue. I want to make it like voice input, output speech recognition content at the cursor of any interface, the QT application has set the content to the clipboard, now I just need to paste the clipboard content to the cursor, but I can't find the paste function here.
-
https://unix.stackexchange.com/questions/192462/how-to-remotely-send-a-keypress-to-an-x11-application
Use QProcess to send out a command from your qt app?
xdotool key ctrl+V -
https://unix.stackexchange.com/questions/192462/how-to-remotely-send-a-keypress-to-an-x11-application
Use QProcess to send out a command from your qt app?
xdotool key ctrl+V -
It will be better to use QProcess than low level system call. And also QProcess is cross-platform and system is not.
-
@pickupy
QProcess
is cross-platform, but the way you do it with an OS command andxdotool
is not. So it really doesn't matter how you invoke it....