1

I'm trying to set a custom shortcut Alt + - [that's a hyphen] to print an em dash and can't get the right command. echo — doesn't work.

Any ideas what I can do?

graham
  • 10,436
m52go
  • 111

1 Answers1

0

xdotool -> link where i found how the tool should work
This program will work only on a xorg system.
sudo apt install xdotool and then when creating a shortcut,
set the command as xdotool key -. This should simulate the key press.
Note that i didn't try this program so i don't know if it works, please comment below if it worked.

Jubast
  • 586
  • 1
  • 4
  • 10
  • Thanks for the suggestion! I found another way to achieve it: https://askubuntu.com/questions/31258/how-can-i-type-a-unicode-character-for-example-em-dash#31283 – m52go Aug 15 '18 at 18:02
  • For the record, I tried it just now and it didn't work. It seems like xdotool needs the specified key to be an actual keyboard key. Letters and numbers worked, but symbols, even simple ones like * didn't. – m52go Aug 15 '18 at 18:07