How to make this heart (♥) using keyboard?
Solution 1
- 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
).
Solution 2
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 more compose key sequences here
Solution 3
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")'
♥
Related videos on Youtube
![jsterr](https://i.stack.imgur.com/PBnPy.jpg?s=256&g=1)
jsterr
Updated on September 18, 2022Comments
-
jsterr almost 2 years
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?
-
Gaurav Bindal about 13 yearsWith compose keys, you can type an em-dash by using
Compose Key
+-
followed by two-
-
jjd about 13 yearsHaving Compose is excellent, only really available out-of-the-box on a Sun Sparc Type 4/5 keyboard (which are incidentally the best layout keyboard I've ever used, and I continue to use a Happy Hacking Keyboard as a result). Unicode hexadecimal will work out-of-the-box, without the user having to reconfigure their keyboard layout first.
-
Oli about 13 yearsMy "compose key" is Shift+AltGr, which I thought was the default. AltGr is very useful on its own (for ¹²³€½¾, etc) so I wouldn't block it.
-
TyrantWave about 13 years@Oli: By using
Shift+AltGr
, you're overriding the shift- version of the AltGr set.AltGr+m
= µ,Shift+AltGr+m
= º, for example. That's why I put compose on a separate key entirely. -
Oli about 13 years@TyrantWave The default compose key is
Shift+AltGr
-- I only meant that I think for the purpose of documenting the compose key, you should talk about the defaults. CoincidentallyCompose+^+0
makes a ⁰ and it logical enough (^
= "to the power of") to be remembered, even guessed (as I just did). -
TyrantWave about 13 years@Oli: Fair enough, I always thought it defaulted to
Right Ctrl
myself, I must have been mistaken. And yeah, compose works well enough to guess most patterns too. -
maxschlepzig almost 13 yearsI guess this only works under gnome (tested it with awesomewm in an xterm, which did not work).
-
Sparhawk almost 12 years@TyrantWave: Using
Shift+AltGr
actually doesn't override the shift version of AltGr. To activate the compose key, you have to hold shift first, press AltGr, then release both. You can still access vanillaAltGr+Shift
by pressing AltGr first.