I know how to map a single key to a command using the gconf settings. I also know how to map a single key to another key (F1 -> ctrl) using Xmodmap. My question is how can I map a single key such as F1 to a multi-key operation such at ctrl+c. I am basically trying to set up a single key to simulate copy. I can think of two ways to possibly do this:

  • Map single key to multiple keys so that when the single key is pressed it is essentially pressing ctrl+c.
  • Use gconf settings to execute the copy “command” upon the single key press. I am not sure if there is a “command” to copy text.
  • Do you want F1 to act like Ctrl+C everywhere? Or do you want F1 to trigger a copy to clipboard everywhere? Or only in Gnome applications? – Gilles 'SO- stop being evil' Jul 26 '13 at 23:26

It's a hack but I ended up downloading xvkdb and compiling it. I then used gconf settings to bind my key to "/path/to/xvkdb -xsendevent -text '\Cc'" for copy. To compile you need the Xaw-devel libraries (Xaw3d-devel.x86_64, libXaw.x86_64 OR Xaw3d.i686, Xaw3d-devel.i686)

If anyone here has a more elegant solution feel free to post it.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.