From b20df606a1abdb4d0a7101baee219902452ba545 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Tue, 20 Mar 2018 14:26:43 +0100 Subject: [PATCH] stop passing default '-k' QEMU option from datacenter.cfg MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Modern noVNC does not needs this anymore, actually things may get worse if it's used. E.g., when one sets 'de' and the VM locale is 'de' you may get a 'ĸ' (unicode kra) if you want to send an ampersand character through pressing SHIFT + 6. Qemus manual pages confirms that this is most times not needed anymore: > -k language > Use keyboard layout language (for example "fr" for > French). This option is only needed where it is not > easy to get raw PC keycodes (e.g. on Macs, with some > X11 servers or with a VNC or curses display). You don't > normally need to use it on PC/Linux or PC/Windows > hosts. -- man kvm An user can always set it per VM, wew simply remove the implict default derived from the cluster wide datacenter.cfg Signed-off-by: Thomas Lamprecht --- PVE/QemuServer.pm | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 0711afb..0bbffa1 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -2572,9 +2572,6 @@ sub load_defaults { } } - my $conf = PVE::Cluster::cfs_read_file('datacenter.cfg'); - $res->{keyboard} = $conf->{keyboard} if $conf->{keyboard}; - return $res; } @@ -3388,9 +3385,7 @@ sub config_to_command { push @$cmd, '-S' if $conf->{freeze}; - # set keyboard layout - my $kb = $conf->{keyboard} || $defaults->{keyboard}; - push @$cmd, '-k', $kb if $kb; + push @$cmd, '-k', $conf->{keyboard} if defined($conf->{keyboard}); # enable sound #my $soundhw = $conf->{soundhw} || $defaults->{soundhw}; -- 2.39.2