Please give a brief summary of your issue:
Hello, I’m writing this message because I have ran into a problem with default key mappings. Main problem is that I couldn’t find a way to off or override standard actions for ‘alt+click’, ‘ctrl+click’, ‘shift+click’, etc. It’s important cases for functionality of our application. Is there any way to solve this problem?
Thank you for the answer, but the issue is not in creating custom actions, the problem is that I can’t override or remove listener for default actions.
For example: ‘alt+click’ on annotation creates its copy and I can’t find a way to change this behavior. Of cource, you may delete it right after creation using ‘annotationChanged’ event when ‘alt’ was pressed, but it looks like crutch and not a good solution.
Another one: ‘ctrl+click’ opens context menu popup and I also can’t change it to custom action. The only solution is to handle context menu open and close it right after when ‘ctrl’ was pressed, but again not clear and context menu popup still appears for a second before close.
And finally, on creation of LineAnnotation using distance measurement tool I can’t use ‘shift+click’ event, because when you hold ‘shift’ tool uses fixed angles like 0, 45, 90, etc., I also couldn’t find a way to change this behavior. It also can be helpful if we can change this angles step, for example, to use 15 instead of 45: 0, 15, 30, etc.
Unfortunately there is no API currently to disable/override these events. We have added this functionality to the backlog and will introduce this in a later version of WebViewer.