Closed TheEmbracedOne closed 4 years ago
I'm using "page up" and "page down" on keyboard, to cycle through commands quickly.
Wow @Vaqq that actually works! This piece of code actually resides in Fungus\Scripts\BlockEditor.cs, marked with comments // Next Command
and //Previous Command
. Modifying that bit of the code from this:
// Previous Command
if ((Event.current.type == EventType.KeyDown) && (Event.current.keyCode == KeyCode.PageUp))
{
SelectPrevious();
GUI.FocusControl("dummycontrol");
Event.current.Use();
}
// Next Command
if ((Event.current.type == EventType.KeyDown) && (Event.current.keyCode == KeyCode.PageDown))
{
SelectNext();
GUI.FocusControl("dummycontrol");
Event.current.Use();
}
to this:
// Previous Command
if ((Event.current.type == EventType.KeyDown) && (Event.current.keyCode == KeyCode.PageUp) ||
(Event.current.type == EventType.KeyDown) && (Event.current.keyCode == KeyCode.UpArrow)) {
SelectPrevious();
GUI.FocusControl("dummycontrol");
Event.current.Use();
}
// Next Command
if ((Event.current.type == EventType.KeyDown) && (Event.current.keyCode == KeyCode.PageDown) ||
(Event.current.type == EventType.KeyDown) && (Event.current.keyCode == KeyCode.DownArrow)) {
SelectNext();
GUI.FocusControl("dummycontrol");
Event.current.Use();
}```
makes it work with arrow keys!
Is your feature request related to a problem? Please describe. It would be super useful if there was a quicker way to cycle through commands on a block. For example if I want to double check all Say commands have the correct character name, it'd be handy to have a faster way to cycle through each command in the current block.
Describe the solution you'd like When pressing up/down keys, I'd like the next/previous command selected, displaying its content below like on a regular click; like this, but on up/down key presses on the keyboard instead of clicking:
This works in the hierarchy window of Unity by default: