3

I am trying to use Autokey-py3 v0.93.10 (in Linux Mint 18.2), to generate Unicode characters using the "keyboard.send_keys" command. Unfortunately none of the following attempts work.

keyboard.sendkeys("—")

keyboard.sendkeys(u"\u2014")

or this attempt copied from unicode.py:

import.paste_character("—")

Can someone advise me what I am missing?

ineuw
  • 65
  • 7

1 Answers1

3

This works for me (mostly):

keyboard.send_keys("<ctrl>+<shift>+u+" + "012b")
keyboard.send_keys("<ctrl>")

It seems to depend on the app you are writing to, the desktop environment, the distro and the version thereof...

For example, it is working now in this window - but it's not working inside LibreOffice Writer on KDE/Manjaro (although it was working there a few months ago).

ekhumoro
  • 98,079
  • 17
  • 183
  • 279
vivasteve
  • 46
  • 2
  • 1
    vivasteve, + . it works where I need it, on editing text pages on Wikipedia. – ineuw Nov 29 '17 at 21:14
  • check this post for an alternative method using phrases: https://brushingupscience.wordpress.com/2015/12/28/add-any-symbol-without-leaving-the-keyboard/ also works in libre writer - nice! – vivasteve Nov 30 '17 at 04:29
  • 1
    again thanks. It never occurred to me to try a script and assigned a key to it. In Windows I use Autohotkey extensively, it is a well documented and a superb keyboard app. – ineuw Dec 01 '17 at 19:49
  • agreed about autohotkey - but autokey is also a great app - documentation, not so good! And it's really great that we still have maintainers of the project - kudos – vivasteve Dec 01 '17 at 23:11
  • What is the need to send ? This seems to be needed. Both with and without that 2nd line, I experience inconsistencies – Cyriac Antony Sep 26 '19 at 11:02