feat extra combined modifiers: Include left and Right HYPER, MEH and othe combinations of modifier shortcuts with documentation
This commit is contained in:
parent
7c09eb217e
commit
527737aedb
5 changed files with 457 additions and 0 deletions
54
app/include/dt-bindings/zmk/extra_modifiers.h
Normal file
54
app/include/dt-bindings/zmk/extra_modifiers.h
Normal file
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* Copyright (c) 2020 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#define LHYP LS(LC(LA(LGUI)))
|
||||
#define LHYPK(key) LS(LC(LA(LG(key))))
|
||||
|
||||
#define LMEH LS(LC(LALT))
|
||||
#define LMEHK(key) LS(LC(LA(key)))
|
||||
|
||||
#define RHYP RS(RC(RA(RGUI)))
|
||||
#define RHYPK(key) RS(RC(RA(RG(key))))
|
||||
|
||||
#define RMEH RS(RC(RALT))
|
||||
#define RMEHK(key) RS(RC(RA(key)))
|
||||
|
||||
#define LSG LS(LGUI)
|
||||
#define LSGK(key) LS(LG(key))
|
||||
|
||||
#define RSG RS(RGUI)
|
||||
#define RSGK(key) RS(RG(key))
|
||||
|
||||
#define LSC LS(LCTRL)
|
||||
#define LSCK(key) LS(LC(key))
|
||||
|
||||
#define RSC RS(RCTRL)
|
||||
#define RSCK(key) RS(RC(key))
|
||||
|
||||
#define LSA LS(LALT)
|
||||
#define LSAK(key) LS(LA(key))
|
||||
|
||||
#define RSA RS(RALT)
|
||||
#define RSAK(key) RS(RA(key))
|
||||
|
||||
#define LCA LC(LALT)
|
||||
#define LCAK(key) LC(LA(key))
|
||||
|
||||
#define RCA RC(RALT)
|
||||
#define RCAK(key) RC(RA(key))
|
||||
|
||||
#define LCG LC(LGUI)
|
||||
#define LCGK(key) LC(LG(key))
|
||||
|
||||
#define RCG RC(RGUI)
|
||||
#define RCGK(key) RC(RG(key))
|
||||
|
||||
#define LAG LA(LGUI)
|
||||
#define LAGK(key) LA(LG(key))
|
||||
|
||||
#define RAG RA(RGUI)
|
||||
#define RAGK(key) RA(RG(key))
|
48
docs/docs/codes/extra_modifiers.mdx
Normal file
48
docs/docs/codes/extra_modifiers.mdx
Normal file
|
@ -0,0 +1,48 @@
|
|||
---
|
||||
title: Extra Modifiers
|
||||
sidebar_label: Extra Modifiers
|
||||
hide_title: true
|
||||
---
|
||||
|
||||
import OsLegend from "@site/src/components/codes/OsLegend";
|
||||
import ToastyContainer from "@site/src/components/codes/ToastyContainer";
|
||||
import Table from "@site/src/components/codes/Table";
|
||||
|
||||
<OsLegend />
|
||||
<ToastyContainer />
|
||||
|
||||
## Extra Modifiers
|
||||
|
||||
Extra modifiers are combinations of the special keyboard keys: _shift_, _alt_, _control_ & _GUI_.
|
||||
|
||||
Extra Modifiers can be used in two forms within ZMK:
|
||||
|
||||
- Modifier [Keys](#modifier-keys) → `HYPL`
|
||||
- Modifier [Functions](#modifier-functions) → `HYPLK(code)`
|
||||
|
||||
The combination of all modifiers `SHIFT`, `GUI`, `ALT` and `CONTROL` is traditionally refered to as `HYPER`. A dedicated _hyper_ key can be found on the Space Cadet Keyboard.
|
||||
On Windows some combinations with `HYPER` are bound to start Office (web) applications. On other operating systems all combinations of hyper can be used for other purposes.
|
||||
The combination of the modifiers, SHIFT, `ALT` and `CONTROL` is referred to as `MEH`. Combinations without `GUI`.
|
||||
|
||||
Other combinations are sometimes used for special keys, e.g. `LSG(F23)`, for pressing left _shift_ _gui_ and _F23_ is used for the 'Copilot' key on Windows systems.
|
||||
|
||||
<Table group="keyboard-extra-modifiers" />
|
||||
|
||||
### Extra Modifier Keys
|
||||
|
||||
These act like any other key code.
|
||||
|
||||
- e.g. `&kp HYPL` pushes and releases the combination of the left modifiers SHIFT, GUI, ALT and CONTROL key.
|
||||
|
||||
### Extra Modifier Functions
|
||||
|
||||
Modifier functions add one or more modifiers to a code.
|
||||
|
||||
These functions take the form: `XX(code)`
|
||||
|
||||
- Modifier functions apply a modifier to a code:
|
||||
- `&kp LSG(A)` = `LEFT_SHIFT`+`LEFT GUI` +`A` (a capitalized **A**).
|
||||
- There are left- and right-handed versions of each exta modifier (also see table above):
|
||||
- `LSGK(x)`, `LSCK(x)`, `LSAK(x)`, `HYPK(x)`, `RSGK(x)`, `RSCK(x)`, `RSAK(x)`, `RHYPK(x)`
|
||||
- Modified keys can safely be rolled-over. Modifier functions are released when another key is pressed.
|
||||
- Press `&kp LHYPK(A)`, then press `&kp B`, release `&kp LHYPK(A)` and release `&kp B` results in **?b**. Whatever hyper A does followed by a b.
|
|
@ -64,6 +64,7 @@ module.exports = {
|
|||
"codes/index",
|
||||
"codes/keyboard-keypad",
|
||||
"codes/modifiers",
|
||||
"codes/extra_modifiers",
|
||||
"codes/editing",
|
||||
"codes/media",
|
||||
"codes/applications",
|
||||
|
|
|
@ -276,6 +276,24 @@ export default {
|
|||
"LEFT_GUI",
|
||||
"RIGHT_GUI",
|
||||
],
|
||||
"keyboard-extra-modifiers": [
|
||||
"LHYP",
|
||||
"RHYP",
|
||||
"LMEH",
|
||||
"RMEH",
|
||||
"LSG",
|
||||
"RSG",
|
||||
"LSC",
|
||||
"RSC",
|
||||
"LSA",
|
||||
"RSA",
|
||||
"LCA",
|
||||
"RCA",
|
||||
"LCG",
|
||||
"RCG",
|
||||
"LAG",
|
||||
"RAG",
|
||||
],
|
||||
"keyboard-navigation": [
|
||||
"HOME",
|
||||
"END",
|
||||
|
|
|
@ -4251,6 +4251,342 @@ export default [
|
|||
},
|
||||
footnotes: {},
|
||||
},
|
||||
{
|
||||
names: ["LHYP", "LHYPK(code)"],
|
||||
description: "Left Hyper: Left SHIFT, GUI, ALT, CONTROL",
|
||||
context: "Keyboard",
|
||||
clarify: false,
|
||||
usages: [
|
||||
{
|
||||
application: keyboardApplication,
|
||||
item: usage(keyPage, 0xe1),
|
||||
},
|
||||
],
|
||||
documentation: "",
|
||||
os: {
|
||||
windows: true,
|
||||
linux: true,
|
||||
android: true,
|
||||
macos: true,
|
||||
ios: true,
|
||||
},
|
||||
footnotes: {},
|
||||
},
|
||||
{
|
||||
names: ["RHYP", "RHYPK(code)"],
|
||||
description: "Right HYPER: Right SHIFT, GUI, ALT, CONTROL",
|
||||
context: "Keyboard",
|
||||
clarify: false,
|
||||
usages: [
|
||||
{
|
||||
application: keyboardApplication,
|
||||
item: usage(keyPage, 0xe1),
|
||||
},
|
||||
],
|
||||
documentation: "",
|
||||
os: {
|
||||
windows: true,
|
||||
linux: true,
|
||||
android: true,
|
||||
macos: true,
|
||||
ios: true,
|
||||
},
|
||||
footnotes: {},
|
||||
},
|
||||
{
|
||||
names: ["LMEH", "LMEHK(code)"],
|
||||
description: "Left MEH: Left SHIFT, ALT, CONTROL",
|
||||
context: "Keyboard",
|
||||
clarify: false,
|
||||
usages: [
|
||||
{
|
||||
application: keyboardApplication,
|
||||
item: usage(keyPage, 0xe1),
|
||||
},
|
||||
],
|
||||
documentation: "",
|
||||
os: {
|
||||
windows: true,
|
||||
linux: true,
|
||||
android: true,
|
||||
macos: true,
|
||||
ios: true,
|
||||
},
|
||||
footnotes: {},
|
||||
},
|
||||
{
|
||||
names: ["RMEH", "RMEHK(code)"],
|
||||
description: "Right MEH: Right SHIFT, ALT, CONTROL",
|
||||
context: "Keyboard",
|
||||
clarify: false,
|
||||
usages: [
|
||||
{
|
||||
application: keyboardApplication,
|
||||
item: usage(keyPage, 0xe1),
|
||||
},
|
||||
],
|
||||
documentation: "",
|
||||
os: {
|
||||
windows: true,
|
||||
linux: true,
|
||||
android: true,
|
||||
macos: true,
|
||||
ios: true,
|
||||
},
|
||||
footnotes: {},
|
||||
},
|
||||
{
|
||||
names: ["LSG", "LSGK(code)"],
|
||||
description: "Left SHIFT, GUI",
|
||||
context: "Keyboard",
|
||||
clarify: false,
|
||||
usages: [
|
||||
{
|
||||
application: keyboardApplication,
|
||||
item: usage(keyPage, 0xe1),
|
||||
},
|
||||
],
|
||||
documentation: "",
|
||||
os: {
|
||||
windows: true,
|
||||
linux: true,
|
||||
android: true,
|
||||
macos: true,
|
||||
ios: true,
|
||||
},
|
||||
footnotes: {},
|
||||
},
|
||||
{
|
||||
names: ["RSG", "RSGK(code)"],
|
||||
description: "Right SHIFT, GUI",
|
||||
context: "Keyboard",
|
||||
clarify: false,
|
||||
usages: [
|
||||
{
|
||||
application: keyboardApplication,
|
||||
item: usage(keyPage, 0xe1),
|
||||
},
|
||||
],
|
||||
documentation: "",
|
||||
os: {
|
||||
windows: true,
|
||||
linux: true,
|
||||
android: true,
|
||||
macos: true,
|
||||
ios: true,
|
||||
},
|
||||
footnotes: {},
|
||||
},
|
||||
{
|
||||
names: ["LSC", "LSCK(code)"],
|
||||
description: "Left SHIFT, CONTROL",
|
||||
context: "Keyboard",
|
||||
clarify: false,
|
||||
usages: [
|
||||
{
|
||||
application: keyboardApplication,
|
||||
item: usage(keyPage, 0xe1),
|
||||
},
|
||||
],
|
||||
documentation: "",
|
||||
os: {
|
||||
windows: true,
|
||||
linux: true,
|
||||
android: true,
|
||||
macos: true,
|
||||
ios: true,
|
||||
},
|
||||
footnotes: {},
|
||||
},
|
||||
{
|
||||
names: ["RSC", "RSCK(code)"],
|
||||
description: "Right SHIFT, CONTROL",
|
||||
context: "Keyboard",
|
||||
clarify: false,
|
||||
usages: [
|
||||
{
|
||||
application: keyboardApplication,
|
||||
item: usage(keyPage, 0xe1),
|
||||
},
|
||||
],
|
||||
documentation: "",
|
||||
os: {
|
||||
windows: true,
|
||||
linux: true,
|
||||
android: true,
|
||||
macos: true,
|
||||
ios: true,
|
||||
},
|
||||
footnotes: {},
|
||||
},
|
||||
{
|
||||
names: ["LSA", "LSAK(code)"],
|
||||
description: "Left SHIFT, ALT",
|
||||
context: "Keyboard",
|
||||
clarify: false,
|
||||
usages: [
|
||||
{
|
||||
application: keyboardApplication,
|
||||
item: usage(keyPage, 0xe1),
|
||||
},
|
||||
],
|
||||
documentation: "",
|
||||
os: {
|
||||
windows: true,
|
||||
linux: true,
|
||||
android: true,
|
||||
macos: true,
|
||||
ios: true,
|
||||
},
|
||||
footnotes: {},
|
||||
},
|
||||
{
|
||||
names: ["RSA", "RSAK(code)"],
|
||||
description: "Right SHIFT, ALT",
|
||||
context: "Keyboard",
|
||||
clarify: false,
|
||||
usages: [
|
||||
{
|
||||
application: keyboardApplication,
|
||||
item: usage(keyPage, 0xe1),
|
||||
},
|
||||
],
|
||||
documentation: "",
|
||||
os: {
|
||||
windows: true,
|
||||
linux: true,
|
||||
android: true,
|
||||
macos: true,
|
||||
ios: true,
|
||||
},
|
||||
footnotes: {},
|
||||
},
|
||||
{
|
||||
names: ["LCA", "LCAK(code)"],
|
||||
description: "Left CONTROL, ALT",
|
||||
context: "Keyboard",
|
||||
clarify: false,
|
||||
usages: [
|
||||
{
|
||||
application: keyboardApplication,
|
||||
item: usage(keyPage, 0xe1),
|
||||
},
|
||||
],
|
||||
documentation: "",
|
||||
os: {
|
||||
windows: true,
|
||||
linux: true,
|
||||
android: true,
|
||||
macos: true,
|
||||
ios: true,
|
||||
},
|
||||
footnotes: {},
|
||||
},
|
||||
{
|
||||
names: ["RCA", "RCAK(code)"],
|
||||
description: "Right CONTROL, ALT",
|
||||
context: "Keyboard",
|
||||
clarify: false,
|
||||
usages: [
|
||||
{
|
||||
application: keyboardApplication,
|
||||
item: usage(keyPage, 0xe1),
|
||||
},
|
||||
],
|
||||
documentation: "",
|
||||
os: {
|
||||
windows: true,
|
||||
linux: true,
|
||||
android: true,
|
||||
macos: true,
|
||||
ios: true,
|
||||
},
|
||||
footnotes: {},
|
||||
},
|
||||
{
|
||||
names: ["LCG", "LCGK(code)"],
|
||||
description: "Left CONTROL, GUI",
|
||||
context: "Keyboard",
|
||||
clarify: false,
|
||||
usages: [
|
||||
{
|
||||
application: keyboardApplication,
|
||||
item: usage(keyPage, 0xe1),
|
||||
},
|
||||
],
|
||||
documentation: "",
|
||||
os: {
|
||||
windows: true,
|
||||
linux: true,
|
||||
android: true,
|
||||
macos: true,
|
||||
ios: true,
|
||||
},
|
||||
footnotes: {},
|
||||
},
|
||||
{
|
||||
names: ["RCG", "RCGK(code)"],
|
||||
description: "Right CONTROL, GUI",
|
||||
context: "Keyboard",
|
||||
clarify: false,
|
||||
usages: [
|
||||
{
|
||||
application: keyboardApplication,
|
||||
item: usage(keyPage, 0xe1),
|
||||
},
|
||||
],
|
||||
documentation: "",
|
||||
os: {
|
||||
windows: true,
|
||||
linux: true,
|
||||
android: true,
|
||||
macos: true,
|
||||
ios: true,
|
||||
},
|
||||
footnotes: {},
|
||||
},
|
||||
{
|
||||
names: ["LAG", "LAGK(code)"],
|
||||
description: "Left ALT, GUI",
|
||||
context: "Keyboard",
|
||||
clarify: false,
|
||||
usages: [
|
||||
{
|
||||
application: keyboardApplication,
|
||||
item: usage(keyPage, 0xe1),
|
||||
},
|
||||
],
|
||||
documentation: "",
|
||||
os: {
|
||||
windows: true,
|
||||
linux: true,
|
||||
android: true,
|
||||
macos: true,
|
||||
ios: true,
|
||||
},
|
||||
footnotes: {},
|
||||
},
|
||||
{
|
||||
names: ["RAG", "RAGK(code)"],
|
||||
description: "Right ALT, GUI",
|
||||
context: "Keyboard",
|
||||
clarify: false,
|
||||
usages: [
|
||||
{
|
||||
application: keyboardApplication,
|
||||
item: usage(keyPage, 0xe1),
|
||||
},
|
||||
],
|
||||
documentation: "",
|
||||
os: {
|
||||
windows: true,
|
||||
linux: true,
|
||||
android: true,
|
||||
macos: true,
|
||||
ios: true,
|
||||
},
|
||||
footnotes: {},
|
||||
},
|
||||
{
|
||||
names: ["K_PLAY_PAUSE", "K_PP"],
|
||||
description: "Play / Pause",
|
||||
|
|
Loading…
Add table
Reference in a new issue