getCursorPosition method
Requests the terminal to send the current cursor position.
The given callback
is invoked with zero-based (x,y) coordinates.
Implementation
void getCursorPosition(void Function(int x, int y) callback) {
stdout.write('\x1B[6n');
_expectingCursorResponse = true;
_cursorCallback = callback;
}