MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / OnKeyDown

Method OnKeyDown

Source/Editor/GUI/ToolStrip.cs:196–213  ·  view source on GitHub ↗

(KeyboardKeys key)

Source from the content-addressed store, hash-verified

194
195 /// <inheritdoc />
196 public override bool OnKeyDown(KeyboardKeys key)
197 {
198 if (base.OnKeyDown(key))
199 return true;
200
201 // Fallback to the owning window for shortcuts
202 EditorWindow editorWindow = null;
203 ContainerControl c = Parent;
204 while (c != null && editorWindow == null)
205 {
206 editorWindow = c as EditorWindow;
207 c = c.Parent;
208 }
209 var editor = Editor.Instance;
210 if (editorWindow == null)
211 editorWindow = editor.Windows.EditWin; // Fallback to main editor window
212 return editorWindow.InputActions.Process(editor, this, key);
213 }
214 }
215}

Callers

nothing calls this directly

Calls 1

ProcessMethod · 0.45

Tested by

no test coverage detected