nRF Connect SDK API 3.3.99
Loading...
Searching...
No Matches
hid_keymap_def.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2018 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
7#include "hid_keymap.h"
8#include <caf/key_id.h>
9
10/* This configuration file is included only once from hid_state module and holds
11 * information about mapping between buttons and generated reports.
12 */
13
14/* This structure enforces the header file is included only once in the build.
15 * Violating this requirement triggers a multiple definition error at link time.
16 */
18
19/*
20 * HID keymap. The Consumer Control keys are defined in section 15 of
21 * the HID Usage Tables document under the following URL:
22 * https://www.usb.org/sites/default/files/hut1_12.pdf
23 */
24static const struct hid_keymap hid_keymap[] = {
25 { KEY_ID(0, 0), 0x01, REPORT_ID_MOUSE }, /* Left Mouse Button */
26 { KEY_ID(0, 1), 0x02, REPORT_ID_MOUSE }, /* Right Mouse Button */
27 { KEY_ID(0, 2), 0x03, REPORT_ID_MOUSE }, /* Middle Mouse Button */
28 { KEY_ID(0, 3), 0x04, REPORT_ID_MOUSE }, /* Additional Mouse Button */
29 { KEY_ID(0, 4), 0x05, REPORT_ID_MOUSE }, /* Additional Mouse Button */
30 { KEY_ID(0, 5), 0x06, REPORT_ID_MOUSE }, /* Additional Mouse Button */
31 { KEY_ID(0, 6), 0x07, REPORT_ID_MOUSE }, /* Additional Mouse Button */
32};
@ REPORT_ID_MOUSE
Definition hid_report_desc.h:42
HID keymap header.
#define KEY_ID(_col, _row)
Definition key_id.h:26
const struct @36 hid_keymap_def_include_once
HID keymap entry.
Definition hid_keymap.h:29