RX14 / autokey

Automatically exported from code.google.com/p/autokey
GNU General Public License v3.0
0 stars 0 forks source link

Skipping non-Latin letters #165

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Неre is a script with Cyrillic letters
keyboard.send_keys("There is no русских letters"), but it inserts Latin 
letters only and skips all the others.

What is the expected output? What do you see instead?
Expected output: There is no русских letters
What I see: There is no  letters

What version of the product are you using? On what operating system?
autokey 0.81.2-0~natty
Ubuntu 11.04

Please provide any additional information below.
default charset: utf-8

Original issue reported on code.google.com by chekhyn on 5 Dec 2011 at 1:49

GoogleCodeExporter commented 9 years ago
Sorry, there is nothing I can do about this - X doesn't natively support 
Cyrillic letters. You can try sending the text via the clipboard instead.

Original comment by cdekter on 5 Dec 2011 at 10:20

GoogleCodeExporter commented 9 years ago
workaround (ubuntu 14.04, autokey-gkt):

Add to begining of file /usr/lib/python2.7/dist-packages/autokey/scripting.py 
this code:
import sys
reload(sys)
sys.setdefaultencoding("utf-8")

And then replace line 
self.clipBoard.set_text(contents.encode("utf-8")) 
to
self.clipBoard.set_text(contents.encode("utf-8"),-1)

Write a simple script and bind it to hotkey:
text="Твой софт\nкод\nшатал!"
text = text.encode('utf-8')
clipboard.fill_clipboard(text)
keyboard.send_keys("<ctrl>+v")

Enjoy! ;)

Original comment by dmitriy....@gmail.com on 13 Aug 2014 at 11:25