@@ -1543,6 +1543,23 @@
{ 'command': 'change-vnc-password', 'data': {'password': 'str'} }
##
+# @change-vnc-kbd-layout:
+#
+# Change the VNC server keyboard layout.
+#
+# @keymap: the new VNC keyboard layout to set.
+#
+# Returns: Nothing on success
+# If VNC is not active, DeviceNotFound.
+#
+# Since: 2.3
+#
+# Notes: Nothing will be changed on failure.
+#
+##
+{ 'command': 'change-vnc-kbd-layout', 'data': {'keymap': 'str'} }
+
+##
# @change:
#
# This command is multiple commands multiplexed together.
@@ -3854,3 +3854,26 @@ Move mouse pointer to absolute coordinates (20000, 400).
<- { "return": {} }
EQMP
+
+ {
+ .name = "change-vnc-kbd-layout",
+ .args_type = "keymap:s",
+ .mhandler.cmd_new = qmp_marshal_input_change_vnc_kbd_layout,
+ },
+
+SQMP
+change-vnc-kbd-layout
+---------------------
+
+Change VNC keyboard layout.
+
+Arguments:
+
+- "keymap": the new VNC keyboard layout to set.
+
+Example:
+
+-> { "execute": "change-vnc-kbd-layout", "arguments": { "keymap": "de" } }
+<- { "return": {} }
+
+EQMP
@@ -366,6 +366,13 @@ void qmp_change_vnc_password(const char *password, Error **errp)
}
}
+void qmp_change_vnc_kbd_layout(const char *keymap, Error **errp)
+{
+ if (vnc_display_kbd_layout(NULL, keymap) < 0) {
+ error_setg(errp, "keyboard layout '%s' set failed", keymap);
+ }
+}
+
static void qmp_change_vnc_listen(const char *target, Error **errp)
{
QemuOptsList *olist = qemu_find_opts("vnc");
@@ -402,6 +409,12 @@ void qmp_change_vnc_password(const char *password, Error **errp)
{
error_set(errp, QERR_FEATURE_DISABLED, "vnc");
}
+
+void qmp_change_vnc_kbd_layout(const char *keymap, Error **errp)
+{
+ error_set(errp, QERR_FEATURE_DISABLED, "vnc");
+}
+
static void qmp_change_vnc(const char *target, bool has_arg, const char *arg,
Error **errp)
{