Welcome to %s forums

BrainModular Users Forum

Login Register

HH6 SDK Mouse Up Multi event bug

Create your own modules in C++
Post Reply
sm_jamieson
Member
Posts: 551
Contact:

HH6 SDK Mouse Up Multi event bug

Unread post by sm_jamieson » 02 Jun 2025, 22:17

On HH6 I am seeing an error with the mouse events.

When a touchpoint is removed an extra mouse down is being sent.
The following is trace from touching and lifting a single finger.

[34] simonj DOWN multi 0: x=0.344595, y=0.734637, pressed=1.000000, mask=91
[36] simonj ++++ MOUSE UP on touchpoint 0
[38] simonj UP multi 0: x=1.000000, y=1.000000, pressed=0.000000, mask=90
[40] simonj DOWN multi 0: x=0.344595, y=0.740223, pressed=1.000000, mask=91

The mask is my own indication of mouse down or up for a number of touchpoints - here only 1 touchpoint exists.

It might be usual have a mouse UP multi with x and y = 1 - I'm not sure but in practice the position of an UP event does not matter.
However, an extra DOWN event is being produced.
This does not happen with the mouse - only with touch.

I have a touch keyboard in my SDK user module and this is causing another keypress !

This does not happen with the same module in HH5.
For comparison, this is what I see in HH5:

[426] simonj DOWN multi 0: x=0.680180, y=0.396648, pressed=1.000000, mask=910
[428] simonj ++++ MOUSE UP on touchpoint 0
[430] simonj UP multi 0: x=1.000000, y=0.726257, pressed=0.000000, mask=900
The interesting thing here is the x and y values are nonsense.

It seems to me that if the HH6 faulty DOWN values were used in the UP and the DOWN was removed, everything would be perfect.

Before I raise a ticket - has anyone else seen this ?

Simon.

sm_jamieson
Member
Posts: 551
Contact:

Unread post by sm_jamieson » 07 Jun 2025, 19:21

Well Senso realised what it is. Not sure why HH5 is different though.

The extra mousedown is from the Windows right click generated on a long touch action.
The shiftstate and mousebutton show that. I think that the long touch right click is generated by Windows when the touch is removed, which is why it always comes at the end.

Simon.

sm_jamieson
Member
Posts: 551
Contact:

Unread post by sm_jamieson » 11 Jun 2025, 22:12

There was another mousedown appearing after a short held touch. It turned out this was from a new "touch" level of events, this being like a Click event rather than mouse down and then up.
The latest sdk is missing some TShiftState values. The full list is below. The way to ignore the new events is to ignore anything where the shift state is ssTouch or higher.
List supplied by Senso. Note these are Delphi values not Windows values.

/// Possible value for a TShiftState variable.
/// @see onMouseMove, onMouseDown, onMouseUp, onMouseMoveMulti, onMouseDownMulti, onMouseUpMulti
static constexpr UINT32 ssShift = 0x1; ///< Shift keyboard state
static constexpr UINT32 ssAlt = 0x2; ///< Alt keyboard state
static constexpr UINT32 ssCtrl = 0x4; ///< Ctrl keyboard state
static constexpr UINT32 ssLeft = 0x8; ///< Left mouse button state
static constexpr UINT32 ssRight = 0x10; ///< Right mouse button state
static constexpr UINT32 ssMiddle = 0x20; ///< Middle mouse button state
static constexpr UINT32 ssDouble = 0x40; ///< Mouse Double click state
static constexpr UINT32 ssTouch = 0x80; ///< Mouse touch screen click state
static constexpr UINT32 ssPen = 0x100; ///< Mouse pen click state
static constexpr UINT32 ssCommand = 0x200; ///< Mouse Command state
static constexpr UINT32 ssHorizontal = 0x400; ///< Mouse Horizontal state

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests