diff options
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | lib/keyboard.pm | 20 |
2 files changed, 21 insertions, 0 deletions
@@ -1,3 +1,4 @@ +- ensure i18n settings are written to xorg.conf.d snippet - write KEYMAP to /etc/vconsole.conf Version 1.4 - 2 January 2015 diff --git a/lib/keyboard.pm b/lib/keyboard.pm index 6c4641d..1d7070f 100644 --- a/lib/keyboard.pm +++ b/lib/keyboard.pm @@ -622,6 +622,26 @@ sub write { addVarsInShMode("$::prefix/etc/vconsole.conf", 0644, $h2); } + my $xorgconf = "# Read and parsed by systemd-localed. It's probably wise not to edit this file\n" . + "# manually too freely.\n" . + "Section \"InputClass\"\n" . + " Identifier \"system-keyboard\"\n" . + " MatchIsKeyboard \"on\"\n"; + if ($keyboard->{'XkbLayout'}) { + $xorgconf .= " Option \"XkbLayout\" \"" . $keyboard->{'XkbLayout'} . "\"\n"; + } + if ($keyboard->{'XkbModel'}) { + $xorgconf .= " Option \"XkbModel\" \"" . $keyboard->{'XkbModel'} . "\"\n"; + } + if ($keyboard->{'XkbVariant'}) { + $xorgconf .= " Option \"XkbModel\" \"" . $keyboard->{'XkbVariant'} . "\"\n"; + } + if ($keyboard->{'XkbOptions'}) { + $xorgconf .= " Option \"XkbOptions\" \"" . $keyboard->{'XkbOptions'} . "\"\n"; + } + $xorgconf .= "EndSection\n"; + output_p("$::prefix/etc/X11/xorg.conf.d/00-keyboard.conf", $xorgconf); + if (arch() =~ /ppc/) { my $s = "dev.mac_hid.keyboard_sends_linux_keycodes = 1\n"; substInFile { |