I’m trying to build a small code editor for simple instructions. The EditTextWidget is located inside a KeyboardWidget to intercept the return/enter key. This should trigger some actions like keyword check and increasing the memory address count. This works pretty well as long as code is appended at the end. But when I insert code into the text, I don’t know how to check for the current position of the cursor.
Is there an (hopefully) easy way to get the current cursor position inside the EditTextWidget?
I think that a possible workaround could be using a “WidgetMessage: tm-edit-text-operation”, but I’ve heard this only works with toolbar buttons and not for plain EditText.