From patchwork Fri Mar 11 02:29:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Programmingkid X-Patchwork-Id: 8561331 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A7DB59F46A for ; Fri, 11 Mar 2016 02:30:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A237F20361 for ; Fri, 11 Mar 2016 02:30:15 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 933562022A for ; Fri, 11 Mar 2016 02:30:14 +0000 (UTC) Received: from localhost ([::1]:52229 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aeCqE-0002tg-1H for patchwork-qemu-devel@patchwork.kernel.org; Thu, 10 Mar 2016 21:30:14 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44547) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aeCq5-0002rP-M7 for qemu-devel@nongnu.org; Thu, 10 Mar 2016 21:30:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aeCq2-0001UM-00 for qemu-devel@nongnu.org; Thu, 10 Mar 2016 21:30:05 -0500 Received: from mail-ig0-x241.google.com ([2607:f8b0:4001:c05::241]:36754) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aeCq1-0001UD-Qs for qemu-devel@nongnu.org; Thu, 10 Mar 2016 21:30:01 -0500 Received: by mail-ig0-x241.google.com with SMTP id ir4so13017igb.3 for ; Thu, 10 Mar 2016 18:30:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-transfer-encoding:subject:date:message-id:cc:to :mime-version; bh=lPiAeAv3G/r2gB6qsS859XNySO4rCd5rNv8G/KcvTkY=; b=ItCJ1L9W76d0KxDxxTChRu4Awvr4iu8+fafqMccEfVQ4FNKUjcAbmyukfjVnISCXEq 88Ow4WsJHdiq83zAVphv7kzrCVhRk2KS6sp4Sj1rI+FHLJzlaP/FEijh3b/Kxt+PTy7I lGR7KdntorW7+6omrDEzPsj9cGiSnzNAenzzsx6XUt0TUmfzZjg5E38qZwba/u5vKq5o ne2xZTC4eUc27wKQzb/33s3xA9D/OTooCjj/3gNPhwJtHaAWcDZY3wbiIifjWiHrNwbe mRoH+YMEQFsCNPGkj9XSj0dllY53iPmaOX9qBWEHccujbg1WOHrQeksjbJkRRiHttnSD fEZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:content-transfer-encoding:subject:date :message-id:cc:to:mime-version; bh=lPiAeAv3G/r2gB6qsS859XNySO4rCd5rNv8G/KcvTkY=; b=UK61CwWOGGH7YslZz4yRcSnwe2QeM6jRK9WoukKF1wXpogNRGCcA01q6T1NyI2Vs0k 4soLsNIvIu7NOTNnzgbic7OAYBirw+qIEbIeHt6x/5XMsQPz8Cl+HHnn10C+lCiyu3BV 9lcYzRrSwEEozzsyRHlGu/iFs/DzQo/OjLE34kL6tnOekUlKYowum0GkeEGICd3oPnWE 1DtRcCuYj9f/uhW/lHCsLJY44ymJxv2Bz+eztGgZQOJRdgVfnzebPJTggH6bxMKvKvQ3 yAMaLO+7I0U27N2omYDn3EBLyMVn9yPaSD3aeLqlc0LXa9XD7V9npCUHdVmHchF5tKqe 9JWg== X-Gm-Message-State: AD7BkJK7FZp2e8cQbcPdCS0YpWLZ4s3p/movs/a2MKfAPNg/35yXPGkv1hBSTv5INyhV7g== X-Received: by 10.50.150.36 with SMTP id uf4mr129126igb.1.1457663401392; Thu, 10 Mar 2016 18:30:01 -0800 (PST) Received: from [192.168.0.5] (d199-74-164-53.col.wideopenwest.com. [74.199.53.164]) by smtp.gmail.com with ESMTPSA id j18sm2699655ioj.40.2016.03.10.18.30.00 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 10 Mar 2016 18:30:01 -0800 (PST) From: Programmingkid Date: Thu, 10 Mar 2016 21:29:59 -0500 Message-Id: <0970CE09-0FCD-4156-8B65-6542AC6224A4@gmail.com> To: Peter Maydell , Gerd Hoffmann , Eric Blake Mime-Version: 1.0 (Apple Message framework v1084) X-Mailer: Apple Mail (2.1084) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4001:c05::241 Cc: qemu-devel qemu-devel Subject: [Qemu-devel] [PATCH v4 3/4] adb-keys.h: initial commit 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This commit implements the adb-keys.h file. It holds information on adb keycode values. Signed-off-by: John Arbuckle Reviewed-by: Peter Maydell --- * v4 changes Replaced an 'a' with 'an'. Replaced __ADBKEYS__ with ADB_KEYS_H. Added additional information comment with link. Changed license to GNU GPL v2 or later. * v3 changes Changed name of file from MacKeys.h to adb-keys.h. Changed name of constants from MAC_KEYS_ to ADB_KEYS_. include/hw/input/adb-keys.h | 146 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 146 insertions(+) create mode 100644 include/hw/input/adb-keys.h diff --git a/include/hw/input/adb-keys.h b/include/hw/input/adb-keys.h new file mode 100644 index 0000000..2e4f759 --- /dev/null +++ b/include/hw/input/adb-keys.h @@ -0,0 +1,146 @@ +/* + * QEMU System Emulator + * + * Copyright (c) 2016 John Arbuckle + * + * This work is licensed under the terms of the GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + */ + +/* + * adb-keys.h + * + * Provides an enum of all the Macintosh keycodes. + * Note: keys like Power, volume related, and eject are handled at a lower + * level and are not available to QEMU. That doesn't mean we can't + * substitute one key for another. The function keys like F1 make a good + * substitute for these keys. This can be done in the GTK, SDL, or Cocoa + * code. + * Additional information: http://stackoverflow.com/questions/3202629 + */ + +#ifndef ADB_KEYS_H +#define ADB_KEYS_H + +enum { + ADB_KEY_A = 0, + ADB_KEY_B = 11, + ADB_KEY_C = 8, + ADB_KEY_D = 2, + ADB_KEY_E = 14, + ADB_KEY_F = 3, + ADB_KEY_G = 5, + ADB_KEY_H = 4, + ADB_KEY_I = 34, + ADB_KEY_J = 38, + ADB_KEY_K = 40, + ADB_KEY_L = 37, + ADB_KEY_M = 46, + ADB_KEY_N = 45, + ADB_KEY_O = 31, + ADB_KEY_P = 35, + ADB_KEY_Q = 12, + ADB_KEY_R = 15, + ADB_KEY_S = 1, + ADB_KEY_T = 17, + ADB_KEY_U = 32, + ADB_KEY_V = 9, + ADB_KEY_W = 13, + ADB_KEY_X = 7, + ADB_KEY_Y = 16, + ADB_KEY_Z = 6, + + ADB_KEY_0 = 29, + ADB_KEY_1 = 18, + ADB_KEY_2 = 19, + ADB_KEY_3 = 20, + ADB_KEY_4 = 21, + ADB_KEY_5 = 23, + ADB_KEY_6 = 22, + ADB_KEY_7 = 26, + ADB_KEY_8 = 28, + ADB_KEY_9 = 25, + + ADB_KEY_GRAVE_ACCENT = 50, + ADB_KEY_MINUS = 27, + ADB_KEY_EQUAL = 24, + ADB_KEY_DELETE = 51, + ADB_KEY_CAPS_LOCK = 57, + ADB_KEY_TAB = 48, + ADB_KEY_RETURN = 36, + ADB_KEY_LEFT_BRACKET = 33, + ADB_KEY_RIGHT_BRACKET = 30, + ADB_KEY_BACKSLASH = 42, + ADB_KEY_SEMICOLON = 41, + ADB_KEY_APOSTROPHE = 39, + ADB_KEY_COMMA = 43, + ADB_KEY_PERIOD = 47, + ADB_KEY_FORWARD_SLASH = 44, + ADB_KEY_LEFT_SHIFT = 56, + ADB_KEY_RIGHT_SHIFT = 60, + ADB_KEY_SPACEBAR = 49, + ADB_KEY_LEFT_CONTROL = 59, + ADB_KEY_RIGHT_CONTROL = 62, + ADB_KEY_LEFT_OPTION = 58, + ADB_KEY_RIGHT_OPTION = 61, + ADB_KEY_LEFT_COMMAND = 55, + ADB_KEY_RIGHT_COMMAND = 54, + + ADB_KEY_KP_0 = 82, + ADB_KEY_KP_1 = 83, + ADB_KEY_KP_2 = 84, + ADB_KEY_KP_3 = 85, + ADB_KEY_KP_4 = 86, + ADB_KEY_KP_5 = 87, + ADB_KEY_KP_6 = 88, + ADB_KEY_KP_7 = 89, + ADB_KEY_KP_8 = 91, + ADB_KEY_KP_9 = 92, + ADB_KEY_KP_PERIOD = 65, + ADB_KEY_KP_ENTER = 76, + ADB_KEY_KP_PLUS = 69, + ADB_KEY_KP_SUBTRACT = 78, + ADB_KEY_KP_MULTIPLY = 67, + ADB_KEY_KP_DIVIDE = 75, + ADB_KEY_KP_EQUAL = 81, + ADB_KEY_KP_CLEAR = 71, + + ADB_KEY_UP = 126, + ADB_KEY_DOWN = 125, + ADB_KEY_LEFT = 123, + ADB_KEY_RIGHT = 124, + + ADB_KEY_HELP = 114, + ADB_KEY_HOME = 115, + ADB_KEY_PAGE_UP = 116, + ADB_KEY_PAGE_DOWN = 121, + ADB_KEY_END = 119, + ADB_KEY_FORWARD_DELETE = 117, + + ADB_KEY_ESC = 53, + ADB_KEY_F1 = 122, + ADB_KEY_F2 = 120, + ADB_KEY_F3 = 99, + ADB_KEY_F4 = 118, + ADB_KEY_F5 = 96, + ADB_KEY_F6 = 97, + ADB_KEY_F7 = 98, + ADB_KEY_F8 = 100, + ADB_KEY_F9 = 101, + ADB_KEY_F10 = 109, + ADB_KEY_F11 = 103, + ADB_KEY_F12 = 111, + ADB_KEY_F13 = 105, + ADB_KEY_F14 = 107, + ADB_KEY_F15 = 113, + + ADB_KEY_VOLUME_UP = 72, + ADB_KEY_VOLUME_DOWN = 73, + ADB_KEY_VOLUME_MUTE = 74, + ADB_KEY_POWER = 32639, +}; + +/* Could not find the value for this key. */ +/* #define ADB_KEY_EJECT */ + +#endif /* ADB_KEYS_H */