I want to develop a program that will run on the background of my Ubuntu 12.04 so when some text is selected in some textbox of any running program and some key-combination is pressed (like ctrl-F12), the text will be cut, reversed, and pasted in the same place.
I know some programs that do it on windows.
It is useful in some programs and web-pages that do not support right-to-left languages like arabic and hebrew - the letters are printed from left to right so the text becomes reversed.
More specifically I need it in Prezi that has this kind of bug in their embedded flash editor (I thought about writing a chrome-plugin, but I don't think such plugin can manipulate the selected text inside flash objects).
Do you know if such a program exist? Where should I start reading in order to develop a program with such capabilities (manipulate selected text in other programs)?
Thanks
My partial solution - A python script that reverses the clipboard text:
Then define a keyboard shortcut to run the script (I used alt-Insert), and reverse selected the by copying it to the clipboard, call the script and paste it back (ctrl-Insert, alt-Insert, shift-Insert).
I'm still looking for a better solution, so I could use a single keyboard shortcut without overriding the clipboard.