summaryrefslogtreecommitdiffstats
path: root/perl-install/keyboard.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/keyboard.pm')
-rw-r--r--perl-install/keyboard.pm7
1 files changed, 7 insertions, 0 deletions
diff --git a/perl-install/keyboard.pm b/perl-install/keyboard.pm
index 7176af4a7..4fdde31b7 100644
--- a/perl-install/keyboard.pm
+++ b/perl-install/keyboard.pm
@@ -447,6 +447,13 @@ sub xmodmap_file {
-e $f && $f;
}
+sub setxkbmap {
+ my ($keyboard) = @_;
+ my $xkb = keyboard::keyboard2full_xkb($keyboard) or return;
+ run_program::rooted($::prefix, 'setxkbmap', '-option', '') if $xkb->{XkbOptions}; #- need re-initialised other toggles are cumulated
+ run_program::rooted($::prefix, 'setxkbmap', $xkb->{XkbLayout}, '-model' => $xkb->{XkbModel}, '-option' => $xkb->{XkbOptions} || '', '-compat' => $xkb->{XkbCompat} || '');
+}
+
sub setup {
my ($keyboard) = @_;