this would be only possible with lua and an interface.
Interfaces have also the ability to have a centered(!) action text. Even when the text is larger than the area, it gets rendered outside.
So you could have an interface with an action text area that is only 1px wide. Set the interface position to absolute. Current Cursor Position has the issue that it cant be corrected so easily and "move". At least when i tested it a few months ago.
Via an event handler, update the offset of said interface to getCursorPos().x + text height / getCursorPos().y. Because your interface has no real width. it should get centered.
function cursorLoop()
Interface["name"].Offset = {x=getCursorPos.x+20 , y=getCursorPos.y}
end
registerEventHandler("mainLoop", "cursorLoop")
(untested)
That text should get rendered even outside of the interface area and gets updated its position via the loop.
Only downside is that the text would also disappear at the screen edges. So you may need to run some checks to prevent this and get you text clip to the screen edges.
Hope that helps as a start.
~Sebastian
PS: another way would be to render the action text completely via lua and no interfaces. But that would include more advanced lua stuff.