Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

On windows I have always used the "ALT+3" for creating a wonderful heart for expressing my love...

Is there a way to do this on Ubuntu?

share|improve this question

3 Answers 3

up vote 9 down vote accepted
  • Ctrl+Shift+U 2 6 6 5 Enter

Control-capital-u means Unicode, and the four-digit hexadecimal number for a "black heart suit" (or any other Unicode character) can be found via the Character Map in Ubuntu (gucharmap).

share|improve this answer

I use compose keys for all those special characters outside the English language. You can also type a heart with them.

System -> Preferences -> Keyboard Preferences

Tab "Layouts", button "Options", choose a "Compose Key Position" (I set it to Right Alt)

Now, anywhere you can type Right Alt + < followed by 3 (or your compose key of choice instead of the Right Alt of course)

btw, don't overdo the hearts...

This works intuitively for all kinds of special characters!

Right Alt + c and = gives €

Right Alt + s and s gives ß

EDIT:

You can find all compose key sequences here

share|improve this answer

If you know a character's code point, you can enter the character (at least in most/all GTK apps) by pressing CTRL+SHIFT+u and then its code point number.

So to make the "♥" character, hold down CTRL and SHIFT while pressing u, then type 2665.

There are many ways to get a character's unicode code point. For example you can, look it up on wikipedia. You can do this by copy-pasting it into their search box, or using a URL like http://en.wikipedia.org/w/index.php?title=Special:Search&search=♥ They may not have entries for all characters, but I've yet to look one up that didn't have an entry providing the code point. I'm sure you could also dig up a comprehensive chart somewhere.

You can also use a programming language. For example:

$ python
Python 2.6.6 (r266:84292, Sep 15 2010, 16:22:56) 
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
unicode>>> unicode('♥', 'utf-8')
u'\u2665'

or more concisely

$ python -c 'print repr(unicode("♥", "utf-8"))'
u'\u2665'

If for some reason you need to generate the character without using the CTRL-SHIFT-u trick, you can do

$ python -c 'print u"\u2665".encode("utf-8")'
♥
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.
{"cc_re__cc_re__cc_by_sa_3_0": ["sites in the Stack Exchange network\">Area 51</a></li>\r\n                        <li><a href=\"//careers.stackoverflow.com?utm_source=stackoverflow.com&amp;utm_medium=site-ui&amp;utm_campaign=footerlink\">Stack Overflow Careers</a></li>\r\n                    \r\n                </ol>\r\n            </td>\r\n    </tr>\r\n</table>\r\n                </div>\r\n            </div>\r\n\r\n            <div id=\"copyright\">\r\n                site design / logo &#169; 2014 stack exchange inc; user contributions licensed under <a href=\"http://creativecommons.org/licenses/by-sa/3.0/\" rel=\"license\">cc by-sa 3.0</a>                   with <a href=\"http://blog.stackoverflow.com/2009/06/attribution-required/\" rel=\"license\">attribution required</a>\r\n            </div>\r\n            <div id=\"svnrev\">\r\n                rev 2014.11.26.2049\r\n            </div>\r\n                <div id=\"additional-notices\">\r\n                    Ubuntu and Canonical are registered trademarks of Canonical Ltd.\r\n                </div>\r\n            \r\n        </div>\r\n    </div>\r\n    <noscript>\r\n        <div id=\"noscript-w"], "copyright__copyright__copyright": ["tion.\nunicode>>> unicode('\u2665', 'utf-8')\nu'\\u2665'\n\nor more concisely\n\n$ python -c 'print repr(unicode(\"\u2665\", \"utf-8\"))'\nu'\\u2665'\n\nIf for some reason you need to generate the character without using the CTRL-SHIFT-u trick, you can do\n\n$ python -c 'print u\"\\u2665\".encode(\"utf-8\")'\n\u2665\nshare|improve this answer\n\nYour Answer\n\n\u00a0\ndiscard\n\nBy posting your answer, you agree to the privacy policy and terms of service.\n\nNot the answer you're looking for? Browse other questions tagged or ask your own question.", "tion.\nunicode>>> unicode('\u2665', 'utf-8')\nu'\\u2665'\n\nor more concisely\n\n$ python -c 'print repr(unicode(\"\u2665\", \"utf-8\"))'\nu'\\u2665'\n\nIf for some reason you need to generate the character without using the CTRL-SHIFT-u trick, you can do\n\n$ python -c 'print u\"\\u2665\".encode(\"utf-8\")'\n\u2665\nshare|improve this answer\n\nYour Answer\n\n\u00a0\ndiscard\n\nBy posting your answer, you agree to the privacy policy and terms of service.\n\nNot the answer you're looking for? Browse other questions tagged or ask your own question."]}