From: Thomas Lamprecht Date: Tue, 20 Mar 2018 13:26:43 +0000 (+0100) Subject: stop passing default '-k' QEMU option from datacenter.cfg X-Git-Url: https://git.proxmox.com/?p=qemu-server.git;a=commitdiff_plain;h=b20df606a1abdb4d0a7101baee219902452ba545 stop passing default '-k' QEMU option from datacenter.cfg 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 --- 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};