You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@sedghi Correct me if I am wrong, but I can only see modifier keys and mouse keys there, but no letter keys like A or Z...
I already tried to implement the feature on my own, by just listening to keydown and keyup events, and setting the respective tool active / passive, so that I can use the tool as long as the buttons are pressed. But it doesn't work somehow, probably because cornerstone3D handles all the mouse events on the viewport and stops propagation?
What feature or change would you like to see made?
I would like to use other keybindings like
SHIFT
+A
+leftclick
to activate a tool.However, to my current knowledge and what I saw in the docs / code of cornerstone3d (https://github.com/cornerstonejs/cornerstone3D/blob/bb71a514486a519a45468b1f474b5c2c0bb25575/packages/tools/src/enums/ToolBindings.ts), this is currently not possible as the ToolBindings only support mouse / modifier keys.
It would be amazing to have a flexible third parameter to pass to the
ToolGroup.setToolActive
(i.e., https://github.com/cornerstonejs/cornerstone3D/blob/bb71a514486a519a45468b1f474b5c2c0bb25575/packages/tools/src/store/ToolGroupManager/ToolGroup.ts#L346C10-L346C) so that it also supports to pass another flexible key (e.g. listening to thekeydown
event - see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code)Why should we prioritize this feature?
Would remove the need to implement this feature on my own, and makes the library tools more flexible to use.
The text was updated successfully, but these errors were encountered: