Relocate various modifier defines (#18638)

This commit is contained in:
Joel Challis 2023-03-11 02:27:29 +00:00 committed by GitHub
parent 46bbb81dd2
commit a974c51d25
Failed to generate hash of commit
4 changed files with 59 additions and 40 deletions

View file

@ -17,6 +17,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
#include "modifiers.h"
/** \brief Action codes
*
* 16bit code: action_kind(4bit) + action_parameter(12bit)
@ -160,28 +162,6 @@ typedef union {
#define ACTION_TRANSPARENT 1
#define ACTION(kind, param) ((kind) << 12 | (param))
/** \brief Key Actions
*
* Mod bits: 43210
* bit 0 ||||+- Control
* bit 1 |||+-- Shift
* bit 2 ||+--- Alt
* bit 3 |+---- Gui
* bit 4 +----- LR flag(Left:0, Right:1)
*/
enum mods_bit {
MOD_LCTL = 0x01,
MOD_LSFT = 0x02,
MOD_LALT = 0x04,
MOD_LGUI = 0x08,
MOD_RCTL = 0x11,
MOD_RSFT = 0x12,
MOD_RALT = 0x14,
MOD_RGUI = 0x18,
};
#define MOD_HYPR (MOD_LCTL | MOD_LSFT | MOD_LALT | MOD_LGUI)
#define MOD_MEH (MOD_LCTL | MOD_LSFT | MOD_LALT)
enum mods_codes {
MODS_ONESHOT = 0x00,
MODS_TAP_TOGGLE = 0x01,