From patchwork Wed Sep 5 18:58:33 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Capitulino X-Patchwork-Id: 181913 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id F1D922C0095 for ; Thu, 6 Sep 2012 04:58:37 +1000 (EST) Received: from localhost ([::1]:40515 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9Ko8-000244-1z for incoming@patchwork.ozlabs.org; Wed, 05 Sep 2012 14:58:36 -0400 Received: from eggs.gnu.org ([208.118.235.92]:42584) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9Knl-0001sr-Op for qemu-devel@nongnu.org; Wed, 05 Sep 2012 14:58:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T9Knk-0001bg-9S for qemu-devel@nongnu.org; Wed, 05 Sep 2012 14:58:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:12531) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9Knk-0001bN-0Y for qemu-devel@nongnu.org; Wed, 05 Sep 2012 14:58:12 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q85IwBsn017500 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 5 Sep 2012 14:58:11 -0400 Received: from localhost (ovpn-113-54.phx2.redhat.com [10.3.113.54]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q85IwAXG005560; Wed, 5 Sep 2012 14:58:10 -0400 From: Luiz Capitulino To: aliguori@us.ibm.com Date: Wed, 5 Sep 2012 15:58:33 -0300 Message-Id: <1346871526-25342-7-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1346871526-25342-1-git-send-email-lcapitulino@redhat.com> References: <1346871526-25342-1-git-send-email-lcapitulino@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: Amos Kong , qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH 06/19] qapi: add the QKeyCode enum X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Amos Kong key_defs[] in monitor.c is a mapping table of keys and keycodes, this patch added a QKeyCode enum. Key's index in the enmu is same as keycode's index in key_defs[]. Signed-off-by: Amos Kong Signed-off-by: Luiz Capitulino --- qapi-schema.json | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/qapi-schema.json b/qapi-schema.json index bd8ad74..856e11a 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -2493,3 +2493,29 @@ # Since: 1.2.0 ## { 'command': 'query-target', 'returns': 'TargetInfo' } + +## +# @QKeyCode: +# +# An enumeration of key name. +# +# This is used by the send-key command. +# +# Since: 1.3.0 +## +{ 'enum': 'QKeyCode', + 'data': [ 'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl', + 'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8', + '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e', + 'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right', + 'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon', + 'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b', + 'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock', + 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10', + 'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply', + 'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0', + 'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8', + 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end', + 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again', + 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut', + 'lf', 'help', 'meta_l', 'meta_r', 'compose' ] }