at master 1.7 kB view raw
1/* 2Copyright 2011,2012 Jun Wako <wakojun@gmail.com> 3 4This program is free software: you can redistribute it and/or modify 5it under the terms of the GNU General Public License as published by 6the Free Software Foundation, either version 2 of the License, or 7(at your option) any later version. 8 9This program is distributed in the hope that it will be useful, 10but WITHOUT ANY WARRANTY; without even the implied warranty of 11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12GNU General Public License for more details. 13 14You should have received a copy of the GNU General Public License 15along with this program. If not, see <http://www.gnu.org/licenses/>. 16*/ 17 18/* 19 * Keycodes based on HID Keyboard/Keypad Usage Page (0x07) plus media keys from Generic Desktop Page (0x01) and Consumer Page (0x0C) 20 * 21 * See https://web.archive.org/web/20060218214400/http://www.usb.org/developers/devclass_docs/Hut1_12.pdf 22 * or http://www.usb.org/developers/hidpage/Hut1_12v2.pdf (older) 23 */ 24 25#pragma once 26 27/* FIXME: Add doxygen comments here */ 28 29#define IS_ANY(code) (KC_A <= (code) && (code) <= 0xFF) 30 31#define IS_MOUSEKEY(code) IS_MOUSE_KEYCODE(code) 32#define IS_MOUSEKEY_MOVE(code) (QK_MOUSE_CURSOR_UP <= (code) && (code) <= QK_MOUSE_CURSOR_RIGHT) 33#define IS_MOUSEKEY_BUTTON(code) (QK_MOUSE_BUTTON_1 <= (code) && (code) <= QK_MOUSE_BUTTON_8) 34#define IS_MOUSEKEY_WHEEL(code) (QK_MOUSE_WHEEL_UP <= (code) && (code) <= QK_MOUSE_WHEEL_RIGHT) 35#define IS_MOUSEKEY_ACCEL(code) (QK_MOUSE_ACCELERATION_0 <= (code) && (code) <= QK_MOUSE_ACCELERATION_2) 36 37#define MOD_BIT(code) (1 << ((code) & 0x07)) 38 39// clang-format off 40 41// TODO: dd keycodes 42#include "keycodes.h" 43#include "modifiers.h"