New user registration is currently disabled due to spam abuse / Регистрация новых пользователей в настоящее время приостановлена из-за злоупотреблений спаммерами

2 Hotkeys (copy + show translation) on Linux

General discussion

2 Hotkeys (copy + show translation) on Linux

Postby Dert » Mon Jun 02, 2014 11:57 am

For me it was annoying that i was forced to press Ctrl + C + C on every word. Ideally it must be one key, or two keys at least. So i managed to do it with 2 keys (f.e. Ctrl + Z). Here is a small guide (u'll need Autokey-Gtk). This is the only way i found, because i wasn't able to get autokey to work with combination like Ctrl + C + C (tried much things).

1. In GoldenDict set the hotkey of pop-up translation to Ctrl + Z (it wll only translate copied to the buffer text)
2. Install AutoKey-Gtk, for example from terminal:
Code: Select all
$ sudo apt-get install autokey-gtk

3. In AutoKey:
a) File -> New -> Folder
b) In that folder: File -> New -> Script
c) Select this script, set the hotkey for it Ctrl + Z
d) In the script body
Code: Select all
keyboard.send_keys("<ctrl>+c")
time.sleep(0.000000000000000000000001)

e) Save the script and u'r done. Setup autokey for launch at login
Dert
 
Posts: 1
Joined: Mon Jun 02, 2014 11:36 am

Return to General

Who is online

Users browsing this forum: No registered users and 24 guests

cron