Ubuntu – Inserting text with a keyboard shortcuts in Ubuntu

14.04unicode

I know we can insert some unicode characters by pressing ALT+[code] combination under Windows, right? I would like to have a similar option under Ubuntu, however in addition to that I'd need to choose my shortcut keys and text to be inserted. For example, I want to insert "⭐" character with a combination (it doesn't matter what combination, it may be even ALT + SHIFT + CTRL + 123).

Is this even possible?

Best Answer

You can hit Ctrl+Shift+U, type an Unicode code point and hit Enter to insert the character bound to that Unicode code point;

For example, to insert :

  • Hit Ctrl+Shift+U
  • Type 2b50
  • Hit Enter

I suggest you to keep using this method, as most Ctrl+[...], Alt+[...] and Shift+[...] sequence will end up conflicting with other functions; however if you really want to use a custom shortcut, you can try your luck and bind a custom shortcut to an xdotoolcommand in System Settings > Keyboard > Shortcuts > Custom Shortcuts; for example, the xdotool command to insert would be:

xdotool key --window '$(xdotool getactivewindow)' Ctrl+Shift+U2B50