Add CMD and WIN aliases for KC_GUI, GUI(kc), GUI_T(kc), etc.
This commit is contained in:
parent
729e99961c
commit
a2e12faa19
5 changed files with 250 additions and 233 deletions
|
@ -7,7 +7,7 @@ This is a reference only. Each group of keys links to the page documenting their
|
||||||
## [Basic Keycodes](keycodes_basic.md)
|
## [Basic Keycodes](keycodes_basic.md)
|
||||||
|
|
||||||
|Key |Aliases |Description |
|
|Key |Aliases |Description |
|
||||||
|-----------------------|----------|-----------------------------------------------|
|
|-----------------------|--------------------|-----------------------------------------------|
|
||||||
|`KC_1` | |`1` and `!` |
|
|`KC_1` | |`1` and `!` |
|
||||||
|`KC_2` | |`2` and `@` |
|
|`KC_2` | |`2` and `@` |
|
||||||
|`KC_3` | |`3` and `#` |
|
|`KC_3` | |`3` and `#` |
|
||||||
|
@ -93,11 +93,11 @@ This is a reference only. Each group of keys links to the page documenting their
|
||||||
|`KC_LCTRL` |`KC_LCTL` |Left Control |
|
|`KC_LCTRL` |`KC_LCTL` |Left Control |
|
||||||
|`KC_LSHIFT` |`KC_LSFT` |Left Shift |
|
|`KC_LSHIFT` |`KC_LSFT` |Left Shift |
|
||||||
|`KC_LALT` | |Left Alt |
|
|`KC_LALT` | |Left Alt |
|
||||||
|`KC_LGUI` | |Left GUI (Windows/Command/Meta key) |
|
|`KC_LGUI` |`KC_LCMD`, `KC_LWIN`|Left GUI (Windows/Command/Meta key) |
|
||||||
|`KC_RCTRL` |`KC_RCTL` |Right Control |
|
|`KC_RCTRL` |`KC_RCTL` |Right Control |
|
||||||
|`KC_RSHIFT` |`KC_RSFT` |Right Shift |
|
|`KC_RSHIFT` |`KC_RSFT` |Right Shift |
|
||||||
|`KC_RALT` | |Right Alt |
|
|`KC_RALT` | |Right Alt |
|
||||||
|`KC_RGUI` | |Right GUI (Windows/Command/Meta key) |
|
|`KC_RGUI` |`KC_RCMD`, `KC_RWIN`|Right GUI (Windows/Command/Meta key) |
|
||||||
|`KC_LOCKING_CAPS` |`KC_LCAP` |Locking Caps Lock |
|
|`KC_LOCKING_CAPS` |`KC_LCAP` |Locking Caps Lock |
|
||||||
|`KC_LOCKING_NUM` |`KC_LNUM` |Locking Num Lock |
|
|`KC_LOCKING_NUM` |`KC_LNUM` |Locking Num Lock |
|
||||||
|`KC_LOCKING_SCROLL` |`KC_LSCR` |Locking Scroll Lock |
|
|`KC_LOCKING_SCROLL` |`KC_LSCR` |Locking Scroll Lock |
|
||||||
|
@ -308,30 +308,30 @@ This is a reference only. Each group of keys links to the page documenting their
|
||||||
|`LCTL(kc)`| |Hold Left Control and press `kc` |
|
|`LCTL(kc)`| |Hold Left Control and press `kc` |
|
||||||
|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` |
|
|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` |
|
||||||
|`LALT(kc)`| |Hold Left Alt and press `kc` |
|
|`LALT(kc)`| |Hold Left Alt and press `kc` |
|
||||||
|`LGUI(kc)`| |Hold Left GUI and press `kc` |
|
|`LGUI(kc)`|`LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` |
|
||||||
|`RCTL(kc)`| |Hold Right Control and press `kc` |
|
|`RCTL(kc)`| |Hold Right Control and press `kc` |
|
||||||
|`RSFT(kc)`| |Hold Right Shift and press `kc` |
|
|`RSFT(kc)`| |Hold Right Shift and press `kc` |
|
||||||
|`RALT(kc)`| |Hold Right Alt and press `kc` |
|
|`RALT(kc)`| |Hold Right Alt and press `kc` |
|
||||||
|`RGUI(kc)`| |Hold Right GUI and press `kc` |
|
|`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)`|Hold Right GUI and press `kc` |
|
||||||
|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc`|
|
|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc`|
|
||||||
|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` |
|
|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` |
|
||||||
|`LCAG(kc)`| |Hold Left Control, Alt and GUI and press `kc` |
|
|`LCAG(kc)`| |Hold Left Control, Alt and GUI and press `kc` |
|
||||||
|`ALTG(kc)`| |Hold Right Control and Alt and press `kc` |
|
|`ALTG(kc)`| |Hold Right Control and Alt and press `kc` |
|
||||||
|`SCMD(kc)`|`SWIN(kc)`|Hold Left Shift and GUI and press `kc` |
|
|`SGUI(kc)`|`SCMD(kc)`, `SWIN(kc)`|Hold Left Shift and GUI and press `kc` |
|
||||||
|`LCA(kc)` | |Hold Left Control and Alt and press `kc` |
|
|`LCA(kc)` | |Hold Left Control and Alt and press `kc` |
|
||||||
|
|
||||||
## [Mod-Tap Keys](quantum_keycodes.md#mod-tap-keys)
|
## [Mod-Tap Keys](quantum_keycodes.md#mod-tap-keys)
|
||||||
|
|
||||||
|Key |Aliases |Description |
|
|Key |Aliases |Description |
|
||||||
|------------|------------|-------------------------------------------------------|
|
|------------|---------------------------------------|-------------------------------------------------------|
|
||||||
|`LCTL_T(kc)`|`CTL_T(kc)` |Left Control when held, `kc` when tapped |
|
|`LCTL_T(kc)`|`CTL_T(kc)` |Left Control when held, `kc` when tapped |
|
||||||
|`RCTL_T(kc)`| |Right Control when held, `kc` when tapped |
|
|`RCTL_T(kc)`| |Right Control when held, `kc` when tapped |
|
||||||
|`LSFT_T(kc)`|`SFT_T(kc)` |Left Shift when held, `kc` when tapped |
|
|`LSFT_T(kc)`|`SFT_T(kc)` |Left Shift when held, `kc` when tapped |
|
||||||
|`RSFT_T(kc)`| |Right Shift when held, `kc` when tapped |
|
|`RSFT_T(kc)`| |Right Shift when held, `kc` when tapped |
|
||||||
|`LALT_T(kc)`|`ALT_T(kc)` |Left Alt when held, `kc` when tapped |
|
|`LALT_T(kc)`|`ALT_T(kc)` |Left Alt when held, `kc` when tapped |
|
||||||
|`RALT_T(kc)`|`ALGR_T(kc)` |Right Alt when held, `kc` when tapped |
|
|`RALT_T(kc)`|`ALGR_T(kc)` |Right Alt when held, `kc` when tapped |
|
||||||
|`LGUI_T(kc)`|`GUI_T(kc)` |Left GUI when held, `kc` when tapped |
|
|`LGUI_T(kc)`|`LCMD_T(kc)`, `RWIN_T(kc)`, `GUI_T(kc)`|Left GUI when held, `kc` when tapped |
|
||||||
|`RGUI_T(kc)`| |Right GUI when held, `kc` when tapped |
|
|`RGUI_T(kc)`|`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped |
|
||||||
|`C_S_T(kc)` | |Left Control and Shift when held, `kc` when tapped |
|
|`C_S_T(kc)` | |Left Control and Shift when held, `kc` when tapped |
|
||||||
|`MEH_T(kc)` | |Left Control, Shift and Alt when held, `kc` when tapped|
|
|`MEH_T(kc)` | |Left Control, Shift and Alt when held, `kc` when tapped|
|
||||||
|`LCAG_T(kc)`| |Left Control, Alt and GUI when held, `kc` when tapped |
|
|`LCAG_T(kc)`| |Left Control, Alt and GUI when held, `kc` when tapped |
|
||||||
|
|
|
@ -102,15 +102,15 @@ The basic set of keycodes are based on the [HID Keyboard/Keypad Usage Page (0x07
|
||||||
## Modifiers
|
## Modifiers
|
||||||
|
|
||||||
|Key |Aliases |Description |
|
|Key |Aliases |Description |
|
||||||
|-------------------|---------|------------------------------------|
|
|-------------------|--------------------|------------------------------------|
|
||||||
|`KC_LCTRL` |`KC_LCTL` |Left Control |
|
|`KC_LCTRL` |`KC_LCTL` |Left Control |
|
||||||
|`KC_LSHIFT` |`KC_LSFT` |Left Shift |
|
|`KC_LSHIFT` |`KC_LSFT` |Left Shift |
|
||||||
|`KC_LALT` | |Left Alt |
|
|`KC_LALT` | |Left Alt |
|
||||||
|`KC_LGUI` | |Left GUI (Windows/Command/Meta key) |
|
|`KC_LGUI` |`KC_LCMD`, `KC_LWIN`|Left GUI (Windows/Command/Meta key) |
|
||||||
|`KC_RCTRL` |`KC_RCTL` |Right Control |
|
|`KC_RCTRL` |`KC_RCTL` |Right Control |
|
||||||
|`KC_RSHIFT` |`KC_RSFT` |Right Shift |
|
|`KC_RSHIFT` |`KC_RSFT` |Right Shift |
|
||||||
|`KC_RALT` | |Right Alt |
|
|`KC_RALT` | |Right Alt |
|
||||||
|`KC_RGUI` | |Right GUI (Windows/Command/Meta key)|
|
|`KC_RGUI` |`KC_RCMD`, `KC_RWIN`|Right GUI (Windows/Command/Meta key)|
|
||||||
|`KC_LOCKING_CAPS` |`KC_LCAP` |Locking Caps Lock |
|
|`KC_LOCKING_CAPS` |`KC_LCAP` |Locking Caps Lock |
|
||||||
|`KC_LOCKING_NUM` |`KC_LNUM` |Locking Num Lock |
|
|`KC_LOCKING_NUM` |`KC_LNUM` |Locking Num Lock |
|
||||||
|`KC_LOCKING_SCROLL`|`KC_LSCR` |Locking Scroll Lock |
|
|`KC_LOCKING_SCROLL`|`KC_LSCR` |Locking Scroll Lock |
|
||||||
|
|
|
@ -122,6 +122,8 @@ extern uint32_t default_layer_state;
|
||||||
|
|
||||||
#define SS_LCTRL(string) SS_DOWN(X_LCTRL) string SS_UP(X_LCTRL)
|
#define SS_LCTRL(string) SS_DOWN(X_LCTRL) string SS_UP(X_LCTRL)
|
||||||
#define SS_LGUI(string) SS_DOWN(X_LGUI) string SS_UP(X_LGUI)
|
#define SS_LGUI(string) SS_DOWN(X_LGUI) string SS_UP(X_LGUI)
|
||||||
|
#define SS_LCMD(string) SS_LGUI(string)
|
||||||
|
#define SS_LWIN(string) SS_LGUI(string)
|
||||||
#define SS_LALT(string) SS_DOWN(X_LALT) string SS_UP(X_LALT)
|
#define SS_LALT(string) SS_DOWN(X_LALT) string SS_UP(X_LALT)
|
||||||
#define SS_LSFT(string) SS_DOWN(X_LSHIFT) string SS_UP(X_LSHIFT)
|
#define SS_LSFT(string) SS_DOWN(X_LSHIFT) string SS_UP(X_LSHIFT)
|
||||||
#define SS_RALT(string) SS_DOWN(X_RALT) string SS_UP(X_RALT)
|
#define SS_RALT(string) SS_DOWN(X_RALT) string SS_UP(X_RALT)
|
||||||
|
|
|
@ -449,10 +449,14 @@ enum quantum_keycodes {
|
||||||
#define LSFT(kc) (kc | QK_LSFT)
|
#define LSFT(kc) (kc | QK_LSFT)
|
||||||
#define LALT(kc) (kc | QK_LALT)
|
#define LALT(kc) (kc | QK_LALT)
|
||||||
#define LGUI(kc) (kc | QK_LGUI)
|
#define LGUI(kc) (kc | QK_LGUI)
|
||||||
|
#define LCMD(kc) LGUI(kc)
|
||||||
|
#define LWIN(kc) LGUI(kc)
|
||||||
#define RCTL(kc) (kc | QK_RCTL)
|
#define RCTL(kc) (kc | QK_RCTL)
|
||||||
#define RSFT(kc) (kc | QK_RSFT)
|
#define RSFT(kc) (kc | QK_RSFT)
|
||||||
#define RALT(kc) (kc | QK_RALT)
|
#define RALT(kc) (kc | QK_RALT)
|
||||||
#define RGUI(kc) (kc | QK_RGUI)
|
#define RGUI(kc) (kc | QK_RGUI)
|
||||||
|
#define RCMD(kc) RGUI(kc)
|
||||||
|
#define RWIN(kc) RGUI(kc)
|
||||||
|
|
||||||
#define HYPR(kc) (kc | QK_LCTL | QK_LSFT | QK_LALT | QK_LGUI)
|
#define HYPR(kc) (kc | QK_LCTL | QK_LSFT | QK_LALT | QK_LGUI)
|
||||||
#define MEH(kc) (kc | QK_LCTL | QK_LSFT | QK_LALT)
|
#define MEH(kc) (kc | QK_LCTL | QK_LSFT | QK_LALT)
|
||||||
|
@ -616,8 +620,14 @@ enum quantum_keycodes {
|
||||||
#define ALGR_T(kc) MT(MOD_RALT, kc) // dual-function AltGR
|
#define ALGR_T(kc) MT(MOD_RALT, kc) // dual-function AltGR
|
||||||
|
|
||||||
#define GUI_T(kc) MT(MOD_LGUI, kc)
|
#define GUI_T(kc) MT(MOD_LGUI, kc)
|
||||||
|
#define CMD_T(kc) GUI_T(kc)
|
||||||
|
#define WIN_T(kc) GUI_T(kc)
|
||||||
#define LGUI_T(kc) MT(MOD_LGUI, kc)
|
#define LGUI_T(kc) MT(MOD_LGUI, kc)
|
||||||
|
#define LCMD_T(kc) LGUI_T(kc)
|
||||||
|
#define LWIN_T(kc) LGUI_T(kc)
|
||||||
#define RGUI_T(kc) MT(MOD_RGUI, kc)
|
#define RGUI_T(kc) MT(MOD_RGUI, kc)
|
||||||
|
#define RCMD_T(kc) RGUI_T(kc)
|
||||||
|
#define RWIN_T(kc) RGUI_T(kc)
|
||||||
|
|
||||||
#define C_S_T(kc) MT((MOD_LCTL | MOD_LSFT), kc) // Control + Shift e.g. for gnome-terminal
|
#define C_S_T(kc) MT((MOD_LCTL | MOD_LSFT), kc) // Control + Shift e.g. for gnome-terminal
|
||||||
#define MEH_T(kc) MT((MOD_LCTL | MOD_LSFT | MOD_LALT), kc) // Meh is a less hyper version of the Hyper key -- doesn't include Win or Cmd, so just alt+shift+ctrl
|
#define MEH_T(kc) MT((MOD_LCTL | MOD_LSFT | MOD_LALT), kc) // Meh is a less hyper version of the Hyper key -- doesn't include Win or Cmd, so just alt+shift+ctrl
|
||||||
|
|
|
@ -167,6 +167,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
/* Transparent */
|
/* Transparent */
|
||||||
#define KC_TRANSPARENT 1
|
#define KC_TRANSPARENT 1
|
||||||
#define KC_TRNS KC_TRANSPARENT
|
#define KC_TRNS KC_TRANSPARENT
|
||||||
|
/* GUI key aliases */
|
||||||
|
#define KC_LCMD KC_LGUI
|
||||||
|
#define KC_LWIN KC_LGUI
|
||||||
|
#define KC_RCMD KC_RGUI
|
||||||
|
#define KC_RWIN KC_RGUI
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue