It's like this: “
(U+201C) ”
(U+201D).
8 Answers
With a Compose key:
- Compose , " →
„
- Compose < " →
“
- Compose > " →
”
- Compose < ' →
‘
- Compose > ' →
’
You can enter the last two characters in either order, at least in most locales. There may be locales where it only works in the order Compose < " works or only in the order Compose " <.
If you need to press Shift or AltGr to enter some of these characters, you'll need to hold those modifiers down as usual. You can press and release Compose before the subsequent characters, or you can press Compose and keep it down, as you prefer.
Most keyboards don't have a key marked “Compose”, but you can configure one and your environment may already have one configured. On a PC, a popular choice is the “Menu” key between the right Windows key and the right Ctrl key. The keyboard settings of most desktop environment include an option to make this key or some other key a Compose key.
-
4No, it doesn't work for me. I've set the Compose key to the right Alt, but either holding it or tapping it won't make <" to “– xzhuMar 23, 2011 at 1:42
-
@trVoldemort Using
Compose < "
andCompose > "
worked for me. If it helps, I am using Linux Mint 12, running the unity shell, on a Macbook Pro, with the right option key set toMulti_key
in my xmodmap. I reference specific hardware only in case the specific keyboard may make a difference.– user18286May 1, 2012 at 1:05 -
@trVoldemort Are you using XIM or any similar input methods? They tend to break usage of Compose. May 2, 2012 at 0:27
-
Compose key combinations also depend on the locale. I like to disambiguate it by sticking my favourites in my
~/.XCompose
file.– AlexiosMay 2, 2012 at 5:26 -
@trVoldemort Notice that to use
Compose < "
differs fromCompose , '
. To get the first, theShift
key must be held down while hitting< "
(which might be a little awkward). May 24, 2013 at 15:10
In Gnome, you would press and hold down Ctrl+Shift, then type u201c.
Of course, that won't work in Gnome Terminal if Ctrl+Shift+c is bound to Copy, in which case type it in GEdit and paste it in, or learn how to enter it in your editor of choice.
-
19You only have to hold down
ctrl+shift
while typing theu
. After that you can let go ofctrl
andshift
and type201c
followed by a space.– WodinMar 22, 2011 at 21:06 -
1@Wodin: The documentation says you have to keep holding it until the end of the numbers, but you're right, it seems to work if you let go after typing the
u
.– MikelMar 22, 2011 at 22:20 -
Would be a pain if you had to keep holding them for the whole thing :) I'm sure I've seen documentation that mentioned my way, but I have no idea where I saw it.– WodinMar 24, 2011 at 11:02
Some ‘smart’ [1] quotes without using Compose [2] (and without remembering Unicode codepoints):
AltGr + 9 = ‘
AltGr + 0 = ’
AltGr + [ = «
AltGr + ] = »
AltGr + Shift + [ = “
AltGr + Shift + ] = ”
These work on any desktop, provided you have ISO_Level3_Shift
assigned to your AltGr key and are using a keyboard mapping like the US International Keyboard with AltGr.
For Compose combinations, check Gilles' answer (or the XCompose file for your locale). They, in turn, are dependent on your locale and/or the presence/settings of your ~/.XCompose
file.
[1] ‘Typographical’ is probably more appropriate. ‘Smart’ refers to the ability of a word processor to automatically use the correct character in a quote pair when you type the ASCII quotes '
or "
.
[2] You can, of course, have both Compose and AltGr enabled. I do, and it works a treat.
Linux Ubuntu users can type smart quotes with ...
AltGr+v / AltGr+b ( “ / ” )
... or ...
AltGr+Shift+v / AltGr+Shift+b ( ‘ / ’ )
I redefined my keyboard layout for good and I simply press alt-key + ; or ' to get: “ ”. Works in every desktop env.
There are many choices how to do it -- for example, you can use character map app (present in Gnome and KDE for sure) to get any character you want.
-
1How exactly to map the key using character map app? I can't find this command in the app.– xzhuMar 24, 2011 at 10:28
For anyone that runs across this: the Compose key for curly quotes didn't work for me until recently. I'd tried it in 2-3 major distros with GNOME 2 and changing the assigned key didn't help, but when I tried with KDE 4 in SimplyMepis and set it to use CapsLock it started working just fine. So trying it again or switching environments, distros, or keys might be worthwhile.
-
I prefer to assign Control to
Caps Lock
. Compose has always worked for me, mapped to the rightCtrl
orMenu
keys, which closely approximates its natural location on keyboards that have it. Which key I use depends on ergonomics, because I use Compose very frequently.– AlexiosMay 2, 2012 at 5:16
On any keyboard layout that I know of, producing these quote marks requires using the third level of some keys. This is typically accessed by holding down the AltGr key as a shift key.
(I’m going to focus on typing these symbols directly, as opposed to by using the compose key or using the “NumPad entry” method, since these symbols are typed so often that they deserve a way to be accessed directly.)
Many European keyboards seem to use AltGr+V (“
)
and AltGr+B (”
)
As for US keyboard, the standard US keyboard does not have these
symbols. It only has two levels (unshifted and shifted) for
alphanumeric keys, and none of them contain these symbols. However,
there is the “US international” variant, on which these symbols can be
accessed on Shift+AltGr+[ (“
) and
Shift+AltGr+] (”
). As you’ll see if
you try to type this, this is impressively inconvenient, as you have to
hold Shift with either hand, AltGr with the right
hand, and then either [ or ] with the right hand
(†1).
US International is named us(intl)
if you use a tool like Setxkbmap:
setxkbmap "us(intl)"
†1: The French quote marks («»
) gets the more convenient place one
level down (AltGr+[ and
AltGr+]), which is curious since I’d think that
the English curly quotes would get a more convenient placement than
them.
More convenient typing on US International
There is an option misc:typo
(“typo” as in “typographical”) which can
be combined with us(intl)
since it only redefines some level 3 and 4
keys. In particular, it maps “
and ”
to
AltGr+K and AltGr+L,
respectively. This seems much more convenient than the keys that
us(intl)
uses. To use this option with us(intl)
:
setxkbmap -option "misc:typo" "us(intl)"
Another thing that can be done is to define some alternative or additional level 3 modifiers, so that the double quotes can be typed more comfortably. According to man xkeyboard-config, Xkb provides quite a few ready-made options:
Option: Description
lv3:switch: Right Ctrl
lv3:menu_switch: Menu
lv3:win_switch: Any Win
lv3:lwin_switch: Left Win
lv3:rwin_switch: Right Win
lv3:alt_switch: Any Alt
lv3:lalt_switch: Left Alt
lv3:ralt_switch: Right Alt
lv3:ralt_switch_multikey: Right Alt; Shift+Right Alt as Compose
lv3:ralt_alt: Right Alt never chooses 3rd level
lv3:enter_switch: Enter on keypad
lv3:caps_switch: Caps Lock
lv3:bksl_switch: Backslash
lv3:lsgt_switch: <Less/Greater>
lv3:caps_switch_latch: Caps Lock; acts as onetime lock when pressed together with another 3rd-level chooser
lv3:bksl_switch_latch: Backslash; acts as onetime lock when pressed together with another 3rd level chooser
lv3:lsgt_switch_latch: <Less/Greater>; acts as onetime lock when pressed together with another 3rd level chooser
Personally I think that CapsLock makes for good level 3 switch:
setxkbmap -option "lv3:caps_switch" "us(intl)"
If you prefer the misc:typo
keybindings, you can of course include
that option as well:
setxkbmap -option "lv3:caps_switch" -option "misc:typo" "us(intl)"
You can use alt codes Alt+0147 for “ and Alt+0148 for ”. Hold Alt and type the numbers that follow.