]> git.proxmox.com Git - qemu-server.git/commitdiff
stop passing default '-k' QEMU option from datacenter.cfg
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 20 Mar 2018 13:26:43 +0000 (14:26 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 21 Mar 2018 09:48:07 +0000 (10:48 +0100)
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 <t.lamprecht@proxmox.com>
PVE/QemuServer.pm

index 0711afbf614d37660f7a230ad8e1bafc767cd3ba..0bbffa157bc159ea9d937019bee2d20d6f3a9f2a 100644 (file)
@@ -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};