diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-11-18 13:42:57 -0500 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-11-18 20:35:52 -0500 |
commit | 0732ef7acf37473847992888bcb6446726d9d877 (patch) | |
tree | 192cc1763bc9f375759ae46ad4e3152d65840472 /src/shared/def.h | |
parent | 98fce79dea6f653dead88638fc17a27280b1f250 (diff) |
localed: match converted keymaps before legacy
Before, X11 keymap fr-pc105-oss would be converted to fr,
even though fr-oss exists. Now, if
/usr/lib/kbd/keymaps/xkb/<layout>[-<variant>].map[.gz] exists,
<layout>[-<variant>] will be used as the console keymap,
falling back to the legacy mappings otherwise.
% sudo localectl set-x11-keymap pl pc105
% localectl
System Locale: LANG=en_US.UTF-8
VC Keymap: pl (was pl2 before)
X11 Layout: pl
X11 Model: pc105
% sudo localectl set-x11-keymap fr pc105 oss
% localectl
System Locale: LANG=en_US.UTF-8
VC Keymap: fr-oss (was fr before)
X11 Layout: fr
X11 Model: pc105
X11 Variant: oss
% sudo localectl set-x11-keymap fr pc105
% localectl
System Locale: LANG=en_US.UTF-8
VC Keymap: fr
X11 Layout: fr
X11 Model: pc105
% sudo localectl set-x11-keymap gb
% localectl
System Locale: LANG=en_US.UTF-8
VC Keymap: gb (was uk before)
X11 Layout: gb
Diffstat (limited to 'src/shared/def.h')
-rw-r--r-- | src/shared/def.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/shared/def.h b/src/shared/def.h index d7e077a577..825db9507f 100644 --- a/src/shared/def.h +++ b/src/shared/def.h @@ -43,3 +43,16 @@ #define LETTERS LOWERCASE_LETTERS UPPERCASE_LETTERS #define REBOOT_PARAM_FILE "/run/systemd/reboot-param" + +#ifdef HAVE_SPLIT_USR +#define KBD_KEYMAP_DIRS \ + "/usr/share/keymaps/\0" \ + "/usr/share/kbd/keymaps/\0" \ + "/usr/lib/kbd/keymaps/\0" \ + "/lib/kbd/keymaps/\0" +#else +#define KBD_KEYMAP_DIRS \ + "/usr/share/keymaps/\0" \ + "/usr/share/kbd/keymaps/\0" \ + "/usr/lib/kbd/keymaps/\0" +#endif |