We need an application that can monitor touch events (on our system they are transcribed as mouse events), but we have no UI to speak of. Is it possible to create a QT console app that can handle mouse or touch events?
Asked
Active
Viewed 253 times
1
-
Get mouse and keyboard events on your App or your OS? – Farhad Oct 16 '17 at 17:30
-
On my console app. – Gio Oct 16 '17 at 17:35
-
**Console applications do not handle these events**, something that can be approached is to create your own console and in it if you can do those types of tasks. – eyllanesc Oct 16 '17 at 17:42
-
1@eyllanesc that's simply not true. Just run aptitude (if you're on a Debian derived system) and try clicking with the mouse. It requires some tty magic, but it is certainly possible. With that in mind, I don't know whether it is possible using QT – Shachar Shemesh Oct 17 '17 at 13:56
-
If you can figure out how to get events from the underlying operating system, driver, or hardware, then it doesn't really matter what the framework does or doesn't support, unless it manages to steal and ignore them before you can get them. So for example you might look into the /dev/input system. – Chris Stratton Oct 18 '17 at 03:56