Implement cursor-key selection?


#1

How could one implement a selection via cursor-keys?
Maybe select next left node, by pressing cursor-left.
Select next right node, by pressing cursor-right.

Can’t get Cursor-Keys to work in GraphView.


#2

I assume you mean the arrow keys. There is no “cursor” as there is in a text editor. (And don’t confuse such a cursor with the Cursor class controlling what is shown where the pointer is.)
Basically you’ll have to add the notion of a cursor, perhaps as a highlight for each node. And you need to extend GoView to handle the arrow keys, which are normally handled as part of dialog navigation:
protected override bool IsInputKey(Keys k) {
if (k == Keys.Down || k == Keys.Up || k == Keys.Left || k == Keys.Right)
return true;
return base.IsInputKey(k);
}