From patchwork Tue Mar 15 17:17:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Programmingkid X-Patchwork-Id: 8590591 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 A3D5E9F294 for ; Tue, 15 Mar 2016 17:17:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9F96820204 for ; Tue, 15 Mar 2016 17:17:28 +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 6B6CD201FE for ; Tue, 15 Mar 2016 17:17:27 +0000 (UTC) Received: from localhost ([::1]:50179 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afsb0-000405-QG for patchwork-qemu-devel@patchwork.kernel.org; Tue, 15 Mar 2016 13:17:26 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51496) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afsap-0003vA-Oc for qemu-devel@nongnu.org; Tue, 15 Mar 2016 13:17:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1afsai-0007RZ-7v for qemu-devel@nongnu.org; Tue, 15 Mar 2016 13:17:15 -0400 Received: from mail-io0-x22d.google.com ([2607:f8b0:4001:c06::22d]:34579) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afsai-0007Qz-1m for qemu-devel@nongnu.org; Tue, 15 Mar 2016 13:17:08 -0400 Received: by mail-io0-x22d.google.com with SMTP id m184so32310610iof.1 for ; Tue, 15 Mar 2016 10:17:08 -0700 (PDT) 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=OhP3V7uo1j3SfPs128c/KUhF5Po+eLA79g+uUZA+E5c=; b=vhXWnRP44VML0oAvyXV/ePFNArqDCTlqCCkzpRjqrqs9ggjmVeirwq9Orgpy52ipeC RWoqF4XYGk7TKSQAXGcWy8FA+GvD+c8NfEXbPTbKZjsWLzvv1uSWV4frgyB+uEiyLUBc 2bWgu1xkbh+/CGCshH47P7STnT/AtP38+He43pjrK0LcVtwaAry+v3wNKAetQiRUMCxU KTKDfvKjPZw6jzZRCdvjwpD8nwe9Db/qOZPBYff35NGCKFt65PgcmjYCzhp+6017h81S R6VY9JaQU5YtZyY5AYB6FyOw2PmuRwgb18xPC+P/ABetQ3I8Y1GmNTo4vZX41Dplxb3Z 3jrg== 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=OhP3V7uo1j3SfPs128c/KUhF5Po+eLA79g+uUZA+E5c=; b=A4Mm5MOWNu3QkHdbYGgbe/tuKP+/+ylfOYYqvsZickn6U/2xRmUkVTAzSjTQmmBNZu XcNjENKe5suq8vS5wx3fl9XFokczg+ac3BeDwzXwT2YPx3YyPh3/09LR4NglYuJfBHRT naYM9LAA947LtZPHzs2lr7+xHAWfWNS37z+x9BbF8RhT078uRVvU2kh7WZlfRGO9BBhs fHCLgVXwkYOiJISGCFbaNZt4gmKEQkAHda22e1/V9ncoSFWX23WNnoEYFPD0sG5vxmjg n+DGTSLK/rMx1Pi/C6FKwPhZOKpYd7prdkblqSLubThe502MtNxa+F4ZzxIdro69F+gw FDLg== X-Gm-Message-State: AD7BkJJzjx3P/DDpaDs3F5nlw8Z0JnwDPuCI9ZoZ8JxIULenYoikL0jGZ+syjklSud/T7g== X-Received: by 10.107.169.223 with SMTP id f92mr2150719ioj.192.1458062227619; Tue, 15 Mar 2016 10:17:07 -0700 (PDT) Received: from [192.168.0.5] (d199-74-164-53.col.wideopenwest.com. [74.199.53.164]) by smtp.gmail.com with ESMTPSA id yq10sm9000451igb.8.2016.03.15.10.17.06 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 15 Mar 2016 10:17:07 -0700 (PDT) From: Programmingkid Date: Tue, 15 Mar 2016 13:17:06 -0400 Message-Id: To: Peter Maydell 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:c06::22d Cc: qemu-devel qemu-devel Subject: [Qemu-devel] [PATCH v5 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 --- * v5 changes Commented out the ADB_KEY_POWER because it isn't in use. It wasn't deleted because it might be useful in the future. Changed the additional information link to another web page. * 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 | 148 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 148 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..f340340 --- /dev/null +++ b/include/hw/input/adb-keys.h @@ -0,0 +1,148 @@ +/* + * 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://www.archive.org/stream/apple-guide-macintosh + * -family-hardware/Apple_Guide_to_the_Macintosh_Family + * _Hardware_2e#page/n345/mode/2up - page 308 + */ + +#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 = 123, + ADB_KEY_SPACEBAR = 49, + ADB_KEY_LEFT_CONTROL = 54, + ADB_KEY_RIGHT_CONTROL = 125, + ADB_KEY_LEFT_OPTION = 58, + ADB_KEY_RIGHT_OPTION = 124, + ADB_KEY_LEFT_COMMAND = 55, + ADB_KEY_RIGHT_COMMAND = 126, + + 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 = 62, + ADB_KEY_DOWN = 61, + ADB_KEY_LEFT = 59, + ADB_KEY_RIGHT = 60, + + 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 */