Skip to content

Commit 0066fbf

Browse files
CP-17631: Don't use a default QEMU keymap
Until now we have been defaulting the keymap to `en-us` but this prevents VNC clients from using the QEMU ExtendedKeyEvent extension for passing raw scan codes. If a keymap is not passed to QEMU, it will default to using `en-us` anyway but will enable the ExtendedKeyEvent extension. This does not change the behaviour for when a keymap has actually been specified. In this case, it is still honoured and passed to QEMU with the `-k` option. Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
1 parent 97f3c6d commit 0066fbf

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

xc/device.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1418,7 +1418,7 @@ type disp_intf_opt =
14181418
(* Display output / keyboard input *)
14191419
type disp_opt =
14201420
| NONE
1421-
| VNC of disp_intf_opt * string option * bool * int * string (* IP address, auto-allocate, port if previous false, keymap *)
1421+
| VNC of disp_intf_opt * string option * bool * int * string option (* IP address, auto-allocate, port if previous false, keymap *)
14221422
| SDL of disp_intf_opt * string (* X11 display *)
14231423

14241424
type media = Disk | Cdrom
@@ -1551,7 +1551,7 @@ let cmdline_of_disp info =
15511551
let ip_addr = Opt.default "127.0.0.1" ip_addr_opt
15521552
and port = if auto then "1" else string_of_int port in
15531553
["-vnc"; ip_addr ^ ":" ^ port] in
1554-
let keymap_opt = ["-k"; keymap] in
1554+
let keymap_opt = match keymap with Some k -> ["-k"; k] | None -> [] in
15551555
List.flatten [unused_opt; vnc_opt; keymap_opt]
15561556
in
15571557
let disp_options, wait_for_port =

xc/device.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ sig
178178

179179
type disp_opt =
180180
| NONE
181-
| VNC of disp_intf_opt * string option * bool * int * string (* IP address, auto-allocate, port if previous false, keymap *)
181+
| VNC of disp_intf_opt * string option * bool * int * string option (* IP address, auto-allocate, port if previous false, keymap *)
182182
| SDL of disp_intf_opt * string (* X11 display *)
183183

184184
type media = Disk | Cdrom

xc/xenops_server_xen.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1102,7 +1102,7 @@ module VM = struct
11021102
?(nics=[]) ?(disks=[]) ?(vgpus=[])
11031103
?(pci_emulations=[]) ?(usb=Device.Dm.Disabled)
11041104
?(parallel=None)
1105-
?(acpi=true) ?(video=Cirrus) ?(keymap="en-us")
1105+
?(acpi=true) ?(video=Cirrus) ?keymap
11061106
?vnc_ip ?(pci_passthrough=false) ?(hvm=true) ?(video_mib=4) () =
11071107
let video = match video, vgpus with
11081108
| Cirrus, [] -> Device.Dm.Cirrus

0 commit comments

Comments
 (0)