Control the editor cursor from a tool?

I’m trying to create a tool for a midi controller to edit patterns without a keyboard, so I’d like to do move the pattern editor cursor from script.

Vertical movement is fine but horizontally the closest I got so far is moving to certain note or effect columns (by setting selected_note_column_index to 1 for example) but I can’t go into subcolumns (as the selected_sub_column_type is read-only).

Is this functionality off-limits for tools? Is there a better way to go about it?

Selecting a subcolumn is not really necessary for editing.
For example, you can select a note (selectec_sub_column_type=1), and from there change the instrument, volume, panning or delay value, etc.
That is, by accessing only the note columns and effect columns you can edit anything.
Selecting a sub column would only be visual.

True, but that visual feedback is what I need (as afaik there is no other way to draw over the pattern editor).

I was thinking about writing values with a knob (or encoder) into different subcolumns depending on where you are with the cursor. Guess I could simulate the cursor by moving the selection but it doesn’t feel right.

The only solution I can think of is to create a temporary floating window that indicates in which subcolumn you are located, having your custom horizontal navigation (do not jump to the next column of notes until you go through all the subcolumns, or something like that). This allows you to indicate where you are before turning the knob. Obviously not the ideal solution.

As you have said, the ideal would be to have access to selected_sub_column_type to be able to move the cursor from the API. Details are still missing from the API, and this is just one of them…

It’d be also nice to be able to trigger built-in keybindings, since Renoise already handles lot of the logic around navigation, selection etc, although I couldn’t find the arrow keys to be configurable for example, but being able to call the existing copy, paste and similar edit commands would be neat as well.

Anyways, for now I’ll handle the subcolumn selecting/writing with designated knobs for each.

Thanks for your input!