You can use keyboardDelegate.on('cursorContextChange') of the InputMethodEngine module to subscribe to cursor change events.