diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/keyboard.pm | 20 |
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 { |