Skip to content

Commit

Permalink
kbd: Rename some keymaps.
Browse files Browse the repository at this point in the history
From upstream kbd, some keymap names are reused across very different
keyboard layouts. This is a a problem because loadkeys just picks the
first keymap it sees. The clashing names lead to e.g.  "loadkeys no"
defaulting to a norwegian dvorak map instead of the much more common
qwerty one.

Used Arch Linux's list of keymaps that need renaming, with a small
deviation: the norwegian dvorak map becomes dvorak-no instead of
no-dvorak, to match the naming scheme for all the other dvorak maps.

fixes #47878

(cherry picked from commit f1987fb)
  • Loading branch information
plutotulp authored and Mic92 committed Oct 9, 2018
1 parent 3ab942e commit df6d40f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions pkgs/os-specific/linux/kbd/default.nix
Expand Up @@ -25,6 +25,19 @@ stdenv.mkDerivation rec {
# Add Neo keymap subdirectory
sed -i -e 's,^KEYMAPSUBDIRS *= *,&i386/neo ,' data/Makefile.am
# Renaming keymaps with name clashes, because loadkeys just picks
# the first keymap it sees. The clashing names lead to e.g.
# "loadkeys no" defaulting to a norwegian dvorak map instead of
# the much more common qwerty one.
pushd data/keymaps/i386
mv qwertz/cz{,-qwertz}.map
mv olpc/es{,-olpc}.map
mv olpc/pt{,-olpc}.map
mv dvorak/{no.map,dvorak-no.map}
mv fgGIod/trf{,-fgGIod}.map
mv colemak/{en-latin9,colemak}.map
popd
# Fix the path to gzip/bzip2.
substituteInPlace src/libkeymap/findfile.c \
--replace gzip ${gzip}/bin/gzip \
Expand Down

0 comments on commit df6d40f

Please sign in to comment.