0

Can an external program ask a GUI application (for example: Gedit, Firefox) to select all the text of the active widget?

--

EDIT: I am looking for the equivalent of pressing Control+A, because blindly sending key presses has proven to be not reliable, as in my former question: `xdotool` does not send keys

EDIT2: I am assuming that the GUI app already has focus.

  • Yes, but the program must ask the desktop environments clipboard, not t he program itself. – eyoung100 Jul 10 '15 at 16:49
  • What program can do that? – Elena Jul 10 '15 at 16:57
  • Unix Clipboards – eyoung100 Jul 10 '15 at 17:03
  • I knew that there was xsel, but xsel only lets you access something that has already been selected. I am looking for the equivalent of Control+A in many programs, but without sending key presses. – Elena Jul 10 '15 at 17:14
  • As far as I know that isn't possible as to select text, the app you're selecting from must have Active Focus. There are many ways t set/get focus but you still need to know which text you selected. You do that by examining the contents of the clipboard etc. – eyoung100 Jul 10 '15 at 17:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.