summaryrefslogtreecommitdiffstats
path: root/lib/keyboard.pm
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2015-02-08 16:47:35 +0000
committerColin Guthrie <colin@mageia.org>2015-02-08 16:47:35 +0000
commit4b3f9c805f7ac68fba2d27f0252c00481309cf43 (patch)
treefc1c4c29d7a41020bc77e1a6e301640c83036c76 /lib/keyboard.pm
parent66aac0fe1ccab71d61b04308bdda326340ae8b25 (diff)
downloaddrakx-kbd-mouse-x11-4b3f9c805f7ac68fba2d27f0252c00481309cf43.tar
drakx-kbd-mouse-x11-4b3f9c805f7ac68fba2d27f0252c00481309cf43.tar.gz
drakx-kbd-mouse-x11-4b3f9c805f7ac68fba2d27f0252c00481309cf43.tar.bz2
drakx-kbd-mouse-x11-4b3f9c805f7ac68fba2d27f0252c00481309cf43.tar.xz
drakx-kbd-mouse-x11-4b3f9c805f7ac68fba2d27f0252c00481309cf43.zip
ensure i18n settings are written to xorg.conf.d snippet
In an ideal world we'd use the localed daemon to write this file for us (thus hiding the implementation detail) but this will not work from the installer context so for now just do it manually. Longer term, all manual stuff should be killed off and we should find a way to make installed and installer contexts both work with dbus services.
Diffstat (limited to 'lib/keyboard.pm')
-rw-r--r--lib/keyboard.pm20
1 files changed, 20 insertions, 0 deletions
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 {