Hi,
I am writing on my own StateMachine and would like to implement a transition
like "Press Z + MouseMove" to zoom in and out.
Because the system does not send the mentioned event, I tried to implement a
transition
which is fired once "Key_Z" is pressed.
Then the state machine is waiting for a mouse movement and zooms.
After releasing the Z key the state machine returns to "neutral" state.
To use the Z key anyway, I had to implement it in this way:
StateMachine.xml:
...
<!-- Z -->
<event NAME="Z" ID="15000" TYPE="Type_KeyPress" BUTTON="BS_NoButton"
BUTTONSTATE="0x0000" KEY="Key_Z" />
...
This event works fine!
Unfortunately the release event does not work at all:
<event NAME="Zrelease" ID="15001" TYPE="Type_KeyRelease" BUTTON="BS_NoButton"
BUTTONSTATE="0x0000" KEY="Key_Z" />
Is there an error in the release line? (e.g. Type oder BUTTON)
The next issue is that no actions are fired when the transition is made by a
key press event.
First I thought this issue occures because I implemented the z key by myself
but even if I use a predefined key like "Key_N"
no action is fired.
In that case my AcINITZOOM action is not executed and the zoom does not work
although I switched the state
(checked via this->GetCurrentState()->GetName() in CanHandleEvent()) and the
mouse movement is caught.
How do I fire an action in a "key transition" and why isn't it fired anyway?
All transitions work fine with other events like leftMouseButton,...
Is there a possibility to use the Z key as a "modifier"? In that case the z key
would not fire key press events all the time.
This could cause some problems too.
Also I tried to create an own "Z+MouseMove" event by changing the Type and
BUTTONSTATE.
Unfortunately without success.
What is the BUTTONSTATE "BS_KeyButtonMask" for? I thought maybe exactly for
this case?
Besides that how do I add new events without recompiling mitk?
Is there a possibility to add new events to mitkInteractionConst.h via
mitkEventMapperAddOn?
Regards,
Piotr
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users