1
Ubuntu tietokoneissa / Vs: Alt + Ctrl / AltGr
« : 25.05.17 - klo:15.18 »
Autokey oli tarpeeksi hyvä workaround minulle:
After trying and failing to get it to work with a combination of xbindkeys and xvkbd/xte (I could never get certain characters {, [, ], }, \, etc. to behave properly, perhaps because I use a Scandinavian keyboard layout), I finally found a simple and practical solution: Autokey. Here are the exact instructions to get it working:
1. Install Autokey through Ubuntu Software (I used the GTK-version, not KDE) or by: “sudo apt-get install autokey-gtk”.
2. Configure one script per key, e.g. for { use this code: keyboard.send_keys("<alt_gr>+7") and set the hotkey to Ctrl+Alt+7 (first set hotkey to 7 then add Ctrl and Alt as modifiers). This at least worked for the most important code-writing keys: { [ ] } \.
3. Add autokey to Startup Applications (search for “start” to find it) and then add a program with “autokey” as the command.
This solution will work for anything running in the current X-session (I think) but will not work if you start a new terminal session using Ctrl+Alt+(F2-F6).
After trying and failing to get it to work with a combination of xbindkeys and xvkbd/xte (I could never get certain characters {, [, ], }, \, etc. to behave properly, perhaps because I use a Scandinavian keyboard layout), I finally found a simple and practical solution: Autokey. Here are the exact instructions to get it working:
1. Install Autokey through Ubuntu Software (I used the GTK-version, not KDE) or by: “sudo apt-get install autokey-gtk”.
2. Configure one script per key, e.g. for { use this code: keyboard.send_keys("<alt_gr>+7") and set the hotkey to Ctrl+Alt+7 (first set hotkey to 7 then add Ctrl and Alt as modifiers). This at least worked for the most important code-writing keys: { [ ] } \.
3. Add autokey to Startup Applications (search for “start” to find it) and then add a program with “autokey” as the command.
This solution will work for anything running in the current X-session (I think) but will not work if you start a new terminal session using Ctrl+Alt+(F2-F6).