1

A friend of mine uses German letters on his windows with united states international Qwerty keyboard. Is there anything like that for Arch Linux? does anyone have any other options if that doesn't exist?

the windows keyboard my friend uses

5
  • I found people writing about problems with "dead keys" with a US international keyboard so I assume this is possible. Apr 19, 2020 at 7:23
  • I don't know if it was Qwerty though... Apr 19, 2020 at 7:24
  • 1
    I actually have a Qwertz keyboard so that would be even better but I guess I could get along with a Qwerty or basically anything else.
    – Hannah
    Apr 19, 2020 at 7:37
  • 1
    Not everybody has windows, and without describing that "US International" layout, there's no way to know how it works. By running setxkbmap 'de(us)', you'll get a US qwerty layout, where pressing AltGr+a will get you ä, AltGr+o ö, AltGr+s ß, etc. Without any dreaded dead keys. You can probably configure that layout from your DE's control panel, too.
    – user313992
    Apr 19, 2020 at 7:49
  • 1
    If you install and use onboard (an on-screen keyboard), you will see the key mappings, when you change the keyboard (using different options of setxkbmap, for example according to the comment by @mosvy.
    – sudodus
    Apr 19, 2020 at 8:10

5 Answers 5

3

Typing setxkbmap us -variant intl into the command line solved my problem just fine.

But thanks for your help guys.

0

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.

0

Mosvy's comment setxkbmap 'de(us)' led me to this entry in xkb/symbols/de.

partial alphanumeric_keys
xkb_symbols "us" {
    include "us"

    name[Group1]="German (US, with German letters)";

    key <AC01> { [           a,          A, adiaeresis, Adiaeresis ] };
    key <AC02> { [           s,          S,     ssharp,      U1E9E ] };
    key <AC10> { [   semicolon,      colon, odiaeresis, Odiaeresis ] };
    key <AC11> { [  apostrophe,   quotedbl, adiaeresis, Adiaeresis ] };
    key <AD03> { [           e,          E,   EuroSign,   EuroSign ] };
    key <AD07> { [           u,          U, udiaeresis, Udiaeresis ] };
    key <AD09> { [           o,          O, odiaeresis, Odiaeresis ] };
    key <AD11> { [ bracketleft,  braceleft, udiaeresis, Udiaeresis ] };
    key <AE03> { [           3, numbersign,    section,    section ] };
    key <AE11> { [       minus, underscore,     ssharp,   question ] };

    include "level3(ralt_switch)"
};

As US, with German letters and include "us" show, this is actually more a us(de) layout, technically.

This gives you two choices for a Umlaut/diaeresis: the letter "aou" itself or the original place ;'[. But only after a modifier, here ralt.


For typing fluently in German on a qwerty keyboard the Umlaute have to be on the colon-quote-left bracket keys. But these are important too, so they should be accessible by modifier. Unless you write a german dialogue with a lot of double qoutes, this should be the best compromise.


And then there is the Y and the Z...

I rather have what I see, and while I need the Umlaute on the right, a Z in the lower left corner disturbs me less than a Z in the usual place but labeled "Y".


So what is needed is some us(de) (the other way round) which is basically standard us, but the colon-key directly produces a ö etc., and for the colon you use AltGr (or another modifier).

Plus the option/variant us(de-YZ): swap these two. For people who want to write "zu" the normal way.


A simple setxkbmap de is actually enough to get the Umlaute. It gets you everything, actually, and that is the problem. Letters A to X and Punkt und Komma are OK, so you can write quite well, but everything else is totally scrambled. As soon as you need a colon, slash or dash you are quite lost.


For the linux console this line "enables" A-Umlaute:

keycode  30 = +a A Control_a nul adiaeresis Adiaeresis

The nul is for making it match Alt and Shift-Alt -- depends on the modifier definitions...


A friend of mine uses German letters

I really wonder in which way...sounds like he uses them on a regular basis.

0

I wrote a script for toggling between US and DE layout and bound that to an easily accessible key combination.

#!/bin/sh
# usage: `xkbmap-toggle us de` toggles between the us and german keyboard layout

# get current layout and parameters
current=`setxkbmap -query | grep ^layout | awk '{print $2}'`
layouts="$@"
first="$1"

# exit if no parameters are given
test -z "$first" && notify-send 'setxkbmap' 'No layout specified' >/dev/null && exit 1

# determine next layout
next_is_target=0
for layout in "$@"; do
    test "$layout" = "$current" && next_is_target=1 && continue
    test $next_is_target -eq 1 && target="$layout" && break
done

# if current was last, set target to first
test -z "$target" && target="$first"

# set new layout
setxkbmap "$target"

# apply xmodmap config again
test -f ~/.config/xmodmap.conf && xmodmap ~/.config/xmodmap.conf

notify-send -t 500 -r 1337 'setxkbmap' "Set layout to $target" >/dev/null
0

Here is a way, which worked for me (I changed my keyboard setup pretty wild, to be able to program on English keyboard, but keeping the Umlaute on ALT + a (=ä) or ALT + SHIFT + a (=Ä)).

  1. Check the keyboard-layout: setxkbmap -print -verbose 10

    $ setxkbmap -print -verbose 10
    Setting verbose level to 10
    locale is C
    Trying to load rules file ./rules/evdev...
    Trying to load rules file /usr/share/X11/xkb/rules/evdev...
    Success.
    Applied rules from evdev:
    rules:      evdev
    model:      pc105
    layout:     de,us,us
    variant:    ,,
    Trying to build keymap using the following components:
    keycodes:   evdev+aliases(qwertz)
    types:      complete
    compat:     complete
    symbols:    pc+de+us:2+us:3+inet(evdev)
    geometry:   pc(pc105)
    xkb_keymap {
        xkb_keycodes  { include "evdev+aliases(qwertz)" };
        xkb_types     { include "complete"  };
        xkb_compat    { include "complete"  };
        xkb_symbols   { include "pc+de+us:2+us:3+inet(evdev)"   };
        xkb_geometry  { include "pc(pc105)" };
    };
    
  2. The normal US-keyboard layout doesn't work with 'Modifier keys or Mod-keys' (keys with special functions on the keyboard like SHIFT, ALT, ALT-GR, ...). The only source that mentions this: xmodmap - ArchWiki

    To change to 'keyboard layout us(intl)': setxkbmap -layout 'us(intl)'

    Check again with: setxkbmap -print -verbose 10

    Setting verbose level to 10
    locale is C
    Trying to load rules file ./rules/evdev...
    Trying to load rules file /usr/share/X11/xkb/rules/evdev...
    Success.
    Applied rules from evdev:
    rules:      evdev
    model:      pc105
    layout:     us(intl)
    Trying to build keymap using the following components:
    keycodes:   evdev+aliases(qwerty)
    types:      complete
    compat:     complete
    symbols:    pc+us(intl)+inet(evdev)
    geometry:   pc(pc105)
    xkb_keymap {
            xkb_keycodes  { include "evdev+aliases(qwerty)" };
            xkb_types     { include "complete"      };
            xkb_compat    { include "complete"      };
            xkb_symbols   { include "pc+us(intl)+inet(evdev)"       };
            xkb_geometry  { include "pc(pc105)"     };
    };
    
  3. Now you can apply changes to the .XModmap like you want to (in my case in example)... if you didn't Step 1. and 2., nothing will happen at step 3.

    ...
        keycode  38 = a A a A adiaeresis Adiaeresis
    ...
    

    To 'source' (make) the changes (active) in the .XModmap: xmodmap .Xmodmap

  4. The changes are not permanent. To make them permanent, you got to execute them at the start up. I'm using i3wm, so I put in the i3wm-config file

    " permanent layout: us intl
    exec_always setxkbmap -layout 'us(intl)'
    " loading the custom-Xmodmap
    exec_always sh -c 'sleep 10 && xmodmap ~/.Xmodmap'
    

    To do the same with the normal gnome-ubuntu (instead of i3wm), crone can do the same job.

P.S. After editing the post, I realized you were asking for Arch. My answer works for Ubuntu... I guess on Arch it's pretty the same.

2
  • Ubunto is not an "arch"; it's an "OS". An architecture is something like "x86-64", "arm", etc.
    – U. Windl
    Jan 22, 2022 at 23:58
  • Arch and Ubuntu are two different distributions of linux. By using ubuntu, I did not try or test it for Arch (-linux); so I don't know if there are i.e. pitfalls or something like this. But the referred source in my post is for Arch-Users and all the things I wrote !should! be pretty much the same (despite someone uses Ubuntu or Arch).
    – Michael
    Jan 24, 2022 at 13:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .