Closed SilverfishVR closed 7 months ago
Needs testing if this happens on all platforms
Im on Win10
this was just never implemented but should be easy to fix, see EntityTreeRenderer::mousePressEvent etc. which all pass Qt::NoModifier: https://github.com/overte-org/overte/blob/f9b5c786fba5d9de5bf374189c18b0084c30e544/libraries/entities-renderer/src/EntityTreeRenderer.cpp#L915
they should all grab the modifiers from the QMouseEvent
When using
Entities.clickDownOnEntity
,Entities.clickReleaseOnEntity
, orEntities.holdingClickOnEntity
, the keyboardModifiers property of the returned pointerEvent is always 0, even if a modifier key is pressed.Seems like a bug to me, and makes it very complicated to detect something like "Shift+click". It is still possible, but you have to also register keyboard events and keep track of the modifier keys state.
Logs all the pointerEvent correctly except keyboardModifieres which is always 0:
ClickDown event properties: {"type":"Press","id":1,"pos2D":{"x":-22.33271598815918,"y":11.494194030761719},"pos3D":{"x":7.227341651916504,"y":-11.495054244995117,"z":40.51707458496094},"normal":{"x":0.00003051851308555342,"y":1,"z":-0.00003064062548219226},"direction":{"x":-0.9338483214378357,"y":-0.20370860397815704,"z":0.2939901649951935},"button":"Primary","isPrimaryButton":true,"isLeftButton":true,"isPrimaryHeld":true,"isSecondaryHeld":false,"isTertiaryHeld":false,"keyboardModifiers":0}