- Home /
Question by
dammage11 · Jul 24, 2018 at 09:08 PM ·
overridecustomeditorhotkeys
Overriding "Ctrl +" in Custom Editor
Hello, I have a custom editor window for controlling nodes on a graph and I'm trying to make it more convenient for the people using the graph. I've implemented custom copy/paste and undo/redo functionality but I'm having trouble getting CTRL+ Z and the others to work exclusively in the custom editor window while it is active. Is it possible to make it so the default inspector does not use these or will I just have to use different hotkeys? I tried Event.current.Use(), but that does not seem to work. Thank you!
if (e.keyCode == KeyCode.Z && curEditorState.controlPressed)
{
if (curNodeCanvas.undoNodes.Count > 0)
{
ContextCallback(new NodeEditorMenuCallback("undo", curNodeCanvas, curEditorState));
}
Event.current.Use();
}
Comment
Your answer
