translate / virtaal

Easy-to-use and powerful offline translation tool
https://virtaal.translatehouse.org
GNU General Public License v2.0
298 stars 57 forks source link

AutoHotKey scripts don't work in Virtaal #3302

Closed msoutopico closed 4 years ago

msoutopico commented 4 years ago

I use an AutoHotKey script(1) to insert a non-breaking space (and other characters) in my translations, but it doesn't seem to work in Virtaal (when I press Ctrl+Shift+space nothing happens).

friedelwolff commented 4 years ago

I'm not familiar with AutoHotKey, but I guess it is a tool for Windows?

As I understand it, Gtk intercepts the keyboard events at a low level on Windows, and doesn't integrate with the Windows key presses as other applications do. I think that is what is causing the issue you are seeing.

As a workaround, you can use the Gtk method to insert arbitrary Unicode characters: Ctrl+Shift+U and then "AD" (while the 'u' character is underlined). I hope that works.

There is nothing at this stage that we can do about this as far as I know.

msoutopico commented 4 years ago

Hi Friedel,

Thanks for your answer.

Yes, AutoHotKey only runs on WIndows as far as I know.

Thanks for your workaround, but I'm not sure I understand what "AD" means. I can press Ctrl+Shft+U. when indeed shows an underlined 'u', and then I understand that I must type the hex code of the character, in this case, "A0" (as the two leading zeros in 00A0 seem to be unnecessary). I guess that's what you meant, and it seems to work. Thanks!

Cheers, Manuel

On Sun, 20 Oct 2019 at 07:15, friedelwolff notifications@github.com wrote:

I'm not familiar with AutoHotKey, but I guess it is a tool for Windows?

As I understand it, Gtk intercepts the keyboard events at a low level on Windows, and doesn't integrate with the Windows key presses as other applications do. I think that is what is causing the issue you are seeing.

As a workaround, you can use the Gtk method to insert arbitrary Unicode characters: Ctrl+Shift+U and then "AD" (while the 'u' character is underlined). I hope that works.

There is nothing at this stage that we can do about this as far as I know.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/translate/virtaal/issues/3302?email_source=notifications&email_token=AA35NEPKLCXDJNE2OB23B4LQPPSN7A5CNFSM4JCIKZ42YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBYCSVA#issuecomment-544221524, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA35NEPBBJXDGMNADD2NTBLQPPSN7ANCNFSM4JCIKZ4Q .

friedelwolff commented 4 years ago

Ah, yes, I had the code wrong. I meant A0, of course.