Currently there is a github repo that provides a .deb file that solves this problem:
Windows US International XCompose for Linux
It is based on a customized .XCompose file as other answers have suggested.
From that page (Ubuntu/Debian):
sudo apt-add-repository -y ppa:rael-gc/utils
sudo apt update
sudo apt install win-us-intl
im-config -n uim
Answer from yms on Stack ExchangeLogout and login. If that doesn't work, try rebooting the system.
Currently there is a github repo that provides a .deb file that solves this problem:
Windows US International XCompose for Linux
It is based on a customized .XCompose file as other answers have suggested.
From that page (Ubuntu/Debian):
sudo apt-add-repository -y ppa:rael-gc/utils
sudo apt update
sudo apt install win-us-intl
im-config -n uim
Logout and login. If that doesn't work, try rebooting the system.
One possibility is to avoid having dead keys and type accented letters with a Compose key instead. For example, type Compose " a to enter ä. You'll have to choose a keyboard layout option that includes a Compose key; a common choice is the key to the left of the right Ctrl key (which I think Windows calls Menu). The advantage of Compose is that you get to be able to type many fancy characters without changing your main layout. The disadvantage is that it takes three presses instead of two for an accented letter.
Alternatively, you can configure the effect of dead keys by creating a file called .XCompose (note CApitalization) in your home directory and listing the combinations you want. Something like:
include "/usr/share/X11/locale/en_US.UTF-8/Compose" <dead_acute> <space> : "'" apostrophe <dead_acute> <exclam> : "'!" <dead_acute> <quotedbl> : "'\"" # etc... <dead_acute> <a> : "á" <dead_acute> <b> : "'b" # etc...
The syntax is fairly simple: the sequence of keys to the left of the : is turned into the string between "" on the right of the :. The extra word on the right is the keysym (i.e., the name of the key) corresponding to this sequence of keys; it's not terribly important. Anything from a # to the end of the line is ignored.
Change the first line to point to the system file if your distribution puts it in a different place. You can look in this file for more syntax examples. <Multi_key> is another name for the Compose key.
On the left, the names between <angle brackets> are keysyms. You can find the list of keysyms in /usr/include/X11/keysymdef.h (this file is in a development package, e.g., x11proto-core-dev on Ubuntu).
Yes, that's a lot of typing, but you should be able to automate much of it by copy-pasting chunks of keysymdef.h and doing a few clever mass replacements. Something that will help is that you can reuse the hexadecimal code on the right to make the right-hand string thanks to the "\xdd" syntax: turn e.g.
#define XK_exclam 0x0021 /* U+0021 EXCLAMATION MARK */
into
<dead_acute> <exclam> : "'\x21"
Finally, you can set up a keyboard layout with dead keys and a Compose key. Being German, you might set up only " as a dead key. If you're going that route, the simplest option is to use the GUI to set up a keyboard with no dead key and an .Xmodmap file for the dead key, containing something like
keysym apostrophe = apostrophe dead_quotedbl
Summary
- If you are using Ubuntu, it probably changed around 2005, when the default character set changed from ISO 8859-1 to UTF-8.
- US Alternative International adds some dead keys.
The dead key settings depend on your locale and character set.
For example:
en_US.UTF-8is defined in/usr/share/X11/locale/en_US.UTF-8/ComposeISO 8859-1is defined in/usr/share/X11/locale/iso8859-1/Compose
If you look in them using grep, you can see there is a difference:
$ grep '<dead_acute> <c>' /usr/share/X11/locale/en_US.UTF-8/Compose
<dead_acute> <c> : "ć" U0107 # LATIN SMALL LETTER C WITH ACUTE
$ grep '<dead_acute> <c>' /usr/share/X11/locale/iso8859-1/Compose
<dead_acute> <c> : "\347" ccedilla
Namely:
- Latin1 encoding: ', c =
ç - UTF-8 encoding: ', c =
ć
The git logs ((en_US.UTF-8) (iso8859-1)) show it has been this way since at least 2004.
The difference between US International and US Alternative International is defined in /usr/share/X11/xkb/symbols/us.
Namely, the US Alternative International layout adds these extra AltGr dead keys:
- dead_macron: on AltGr-minus
- dead_breve: on AltGr-parenleft
- dead_abovedot: on AltGr-period
- dead_abovering: on AltGr-0
- dead_doubleacute: on AltGr-equal (as quotedbl is already used)
- dead_caron: on AltGr-less (AltGr-shift-comma)
- dead_cedilla: on AltGr-comma
- dead_ogonek: on AltGr-semicolon
- dead_belowdot: on AltGr-underscore (AltGr-shift-minus)
- dead_hook: on AltGr-question
- dead_horn: on AltGr-plus (AltGr-shift-equal)
- dead_diaeresis: on AltGr-colon (Alt-shift-semicolon)
For example:
- US International: AltGr+- =
¥ - US Alternative International: AltGr+-, a =
ā
UTF-8 became the default encoding:
- Red Hat 8.0 "Psyche", released September 30, 2002 reference
- Ubuntu 5.04 "hoary", released April 8, 2005 reference
- Debian 4.0 "etch", released as "stable" April 8, 2007 reference 1 reference 2
Complementing Vítor Souza answer
Using an US international keyboard layout with OS Language in English and having a beautiful cedilla.
To have English Language with ç/Ç working beautifully ( 'c -> cedilla ) isn't necessary to change the compose files. What one have to do is to set the LC_CTYPE with a locale that contains this definition:
<dead_acute> <c> : "\347" ccedilla.
Like pt_BR.UTF-8 (Brazilian Portuguese / Português Brasileiro).
X keyboard map:
# setxkbmap -layout us -variant intl
/etc/locale.conf
# nano /etc/locale.conf
LANG=en_US.UTF-8
LANGUAGE="en_US"
LC_CTYPE=pt_BR.UTF-8
Update locale
# source /etc/profile
And for tty:
Set the right keymap, font and font map, eg.
# nano /etc/vconsole.conf
KEYMAP=us-acentos
FONT=ter-114n
FONT_MAP=8859-1
Typing setxkbmap us -variant intl into the command line solved my problem just fine.
But thanks for your help guys.
Here's how I do it on Debian (with X, xdm and fvwm, not Wayland):
May keyboard identifies as "pc104/us/altgr-int" under X.
I have an .Xmodmap file, which contents include
remove mod4 = Super_L Hyper_L
keysym Super_L = Mode_switch
keycode 34 = bracketleft braceleft adiaeresis Adiaeresis
keycode 35 = bracketright braceright udiaeresis Udiaeresis
keycode 51 = backslash bar odiaeresis Odiaeresis
keycode 21 = equal plus ssharp ssharp
keycode 47 = semicolon colon doublelowquotemark singlelowquotemark paragraph degree paragraph degree
keycode 48 = apostrophe quotedbl leftdoublequotemark leftsinglequotemark dead_acute dead_diaeresis dead_acute dead_diaeresis
This allows me to use the left "Windows" key as a mode switch to get äüöÄÜÖß on the places where those are normally on a German keyboard, and additionally „“‚‘ on the middle row.
No Alt-Gr needed (I always break my finger when I try to use that), and Shift works as expected for Umlauts.
The .Xmodmap is read by a command xmodmap $HOME/.Xmodmap in the ~/.xsession file that xdm executes on session login.
There are lots of variants possible; in particular Arch Linux and the display manager your friend uses (whatever he has installed, or whatever Arch uses by default) will likely require slightly different file names, or a different setup.
I have following issue: I am German, so I would like to use letters like ü and ö. But the German keyboard is terrible, because I program a lot and have to write a lot in English. I currently use the US-intl layout, but I don't like it. To print " I have to press first the "-key and then a space to confirm it, because if I would want to make an ö, I would press: ¨ and then o. This is extremely annoying, because I can write an ö just with Alt Gr + p.
So I would like to change this behavior. I just want to use Alt Gr + p and if I want an ", I want it instant. It's unnecessary to have multiple options for ö.
Furthermore, I don't want to change my keyboard layout every 2 seconds.
Is there a somewhat manageable way to create my custom layout? I use Fedora and looked into X Keyboard extension and Kmonad, but both of these solution seem to be overly complicated - I wasn't even able to get kmonad running.
Is there a simple solution? If there are any Germans here, how are you solving this issue?
Trying to place a preorder for the Framework 16 (woot!)
Sorry, but i'm staring at the picture (and have searched!) But cannot find any differences (other than the win/super silkscreen) between:
us english
international english
international english linux
I will be running linux & i3 FWIW - although i dont really care if it says windoze on the key or not :). I would love if they'd relabel caps/ctrl "correctly" tho so my partner can stop getting confused! :)
The configuration file referenced by man 5 sway-input is the sway configuration file in ~/.config/sway/config or ~/.sway/config or other allowed locations. You can find the default configuration in /etc/sway/config.
To set your chosen layout(s) it should be enough to add something similar to this in the configuration:
input type:keyboard {
xkb_layout fr,us # two layouts
xkb_variant oss,intl # their respective variants
xkb_options grp:sclk_toggle # toggle between layouts with the scroll-lock button
xkb_numlock enabled # enable numlock when logging in
}
You can find the codes for all layouts, variants and toggle keys listed in man xkeyboard-config.
Which distro are you using? At least on Debian-based distros, the keyboard is controlled by /etc/default/keyboard.
See the keyboard(5) man page for more information: Link