Page 1 of 1

Simulate touch events with POSTWM / SENDWM ?

Posted: Wed Mar 20, 2019 3:52 pm
by Polisson
XMBC Version: 2.18.5

Hi guys!

Because Change Movement to Scroll with Excel sheets gives barely nothing (the usability is so poor), I was wondering to use touch event to scroll. Many recent apps (Office suites, popular Internet browsers and so on...) has some kind of touch support.

I don't know how much time I've spent on seeking the way to achieve this: middle button acts like one finger touch as long as I pressing the button.
I thought that doing it with XBMC is impossible, but today looking for some options I've encountered {POSTWM:<M>,<L>,<W>}... still wondering how to connect it with WM_TOUCH messages...

Sorry, I'm not a developer or even programmer. So if my thoughts are ridiculous :roll: , please give me some hints to work around it.

Re: Simulate touch events with POSTWM / SENDWM ?

Posted: Wed Mar 20, 2019 4:06 pm
by phil
I don't know anything about WM_TOUCH but a quick look on MSDN it seems it is sent by Windows to a window but it passes a complex object (pointer to an array of TouchInput structures) that describes each touch point.

There is no way to create this array in XMBC simulated keystrokes and tell the POSTWM/SENDWM to use it 0 its just not practical. The POSTWM and SENDWM have been added to allow access to simple messages - anything that passes pointers to objects is not going to be possible.
AutoHotkey may give you more options as you can perhaps do a lot more in its scripting engine.

It may be possible to add this into XMBC (not using POSTWM/SENDWM) but maybe by sending touch messages instead of scroll messages (for use with change movement to scroll, or as tags in simulated keystrokes {touchup} {touchdown} etc.) - but I would have to study the touch APIs and see whats possible before I would know how best it could be done (if it can be down at all).