You can use autokey-gtk
. If you set Autokey to run at login, it will sit in the background and monitor input from your keyboard and mouse.
Example: You stated you would like to make Ctrl + Q act like Ctrl + C. If you ask autokey-gtk
to "press" Ctrl + C when Ctrl + Q is pressed.
To install autokey-gtk
issue the following command in a terminal
sudo apt-get install autokey-gtk
After installation, you can access it through the Dash or by typing auto-gtk
in a terminal. To set the key combinations that you stated above, do the following:
Step 1
Run autokey-gtk
Step 2
Create a New Top-Level Folder from File -> Create -> New Top-Level Folder
Step 3
Select Folder and create New Script from File -> Create -> New Script
Step 4
in the # Enter script code box, enter "keyboard.send_keys(shortcut you desire to imitate)"
Examples:
1. keyboard.send_keys("<ctrl>+c")
2. keyboard.send_keys("<ctrl>+v")
3. keyboard.send_keys("<ctrl>+x")
NOTE: repeat Step 3-4 for each hotkey you want to add
Step 5
For each Script you made click on the second "set button" next to Hotkey and enter your key combination that you will use to imitate.
In your case for the keyboard.send_keys("<ctrl>+c") script
you would type Q in the text box and click on the Control button
and then click OK.
**Do this for each script, being sure to modify your hotkey of course.*
Step 6
Click on *Edit* -> *Preferences*
Select the check box next to Automatically start Autokey at Login
This should accomplish what your asking for :)
One solution was to switch the backend to screen. However, I had recurring issues with ctrl-right when I did that. To do that change ~/.byobu/backend
to BYOBU_BACKEND=screen
.
I subsequently found a much better solution using tmux from this bug. Create ~/.byobu/.tmux.conf
with this value:
set-window-option -g xterm-keys on
Then ~/.byobu/keybindings.tmux
with:
unbind-key -n C-Left
unbind-key -n C-Right
Now ctrl-left and ctrl-right jump one word at a time in tmux.
Best Answer
The culprit is xbinkeys, a software made to create custom shortcuts. The CTRL+F lauching xterm is an example in the configuration file (~.xbindkeysrc). Since Ubuntu 11.10 doesn't realise it is an example and use it by default, overriding all other uses of CTRL+F.
In order to set things back to normal do as follow :
killall -HUP xbindkeys