5

I am trying to use xbindkeys to insert the "∃" character with a keyboard shortcut. The following doesn't work:

"xvkbd -xsendevent -text '∃'" control + shift + 3

Instead, it sends "â".

George
  • 1,809
  • And where do you want to "insert" this character? It is better to configure specific application (text editor, shell, whatever). – jimmij Oct 20 '14 at 20:42
  • I'd like to at least be able to insert this character in emacs, vim, or in a browser search bar with the same bind. Why is this problematic? – George Oct 20 '14 at 23:42
  • 1
    Why would you use xbindkeys instead of XCompose? This is exactly what XCompose is meant for. – HalosGhost Oct 21 '14 at 16:02
  • Good suggestion. Could I call Xcompose from my xbindkeys configuration? The xcompose readme isn't very clear. – George Oct 21 '14 at 16:11
  • Related : http://unix.stackexchange.com/questions/134473/remapping-a-keyboard-key-to-print-irony-mark – Leiaz Oct 21 '14 at 16:38

1 Answers1

3

I don't have a fix, but at least a partial explanation: Linux uses UTF-8 encoding for Unicode characters, so the "∃" character is represented by three bytes \342\210\203. In ISO-8859-1, the byte \342 represents the character "â", and \210 and \203 represent (unprintable) control characters. It seems that there is at least one tool – xbindkeys, xvkbd, the X server, the application in which you want to insert the character, or whatever – that interprets your three-byte sequence as ISO-8859-1. That means, this tool either doesn't understand UTF-8 at all, or it is not configured to understand UTF-8 (i.e., its so-called locale is ISO-8859-1 rather than UTF-8). Unfortunately, I can't tell you which tool is the culprit.

Does copying and pasting the "∃" character using the mouse work, or does it fail as well?

Uwe
  • 3,297
  • 18
  • 19
  • I see. Copying and pasting the ∃ character does work (in emacs, vim, and browser text fields). – George Oct 21 '14 at 15:57
  • So the application is working with UTF-8, and probably the X server as well. Perhaps there's a problem with xbindkeys or xvkbd. I'd try one of the other methods explained in http://unix.stackexchange.com/questions/134473/remapping-a-keyboard-key-to-print-irony-mark – Uwe Oct 21 '14 at 17:07