Add CMD and WIN aliases for KC_GUI, GUI(kc), GUI_T(kc), etc.

master
fauxpark 2018-03-15 13:23:33 +11:00 committed by Jack Humbert
parent 729e99961c
commit a2e12faa19
5 changed files with 250 additions and 233 deletions

View File

@ -7,7 +7,7 @@ This is a reference only. Each group of keys links to the page documenting their
## [Basic Keycodes](keycodes_basic.md)
|Key |Aliases |Description |
|-----------------------|----------|-----------------------------------------------|
|-----------------------|--------------------|-----------------------------------------------|
|`KC_1` | |`1` and `!` |
|`KC_2` | |`2` 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_LSHIFT` |`KC_LSFT` |Left Shift |
|`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_RSHIFT` |`KC_RSFT` |Right Shift |
|`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_NUM` |`KC_LNUM` |Locking Num Lock |
|`KC_LOCKING_SCROLL` |`KC_LSCR` |Locking Scroll Lock |
@ -302,42 +302,42 @@ This is a reference only. Each group of keys links to the page documenting their
## [Modifiers](quantum_keycodes.md#modifiers)
|Key |Aliases |Description |
|----------|----------|----------------------------------------------------|
|----------|---------- |----------------------------------------------------|
|`KC_HYPR` | |Hold Left Control, Shift, Alt and GUI |
|`KC_MEH` | |Hold Left Control, Shift and Alt |
|`LCTL(kc)`| |Hold Left Control and press `kc` |
|`LSFT(kc)`|`S(kc)` |Hold Left Shift 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` |
|`RSFT(kc)`| |Hold Right Shift 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`|
|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` |
|`LCAG(kc)`| |Hold Left Control, Alt and GUI 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` |
## [Mod-Tap Keys](quantum_keycodes.md#mod-tap-keys)
|Key |Aliases |Description |
|------------|------------|-------------------------------------------------------|
|------------|---------------------------------------|-------------------------------------------------------|
|`LCTL_T(kc)`|`CTL_T(kc)` |Left 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 |
|`RSFT_T(kc)`| |Right Shift 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 |
|`LGUI_T(kc)`|`GUI_T(kc)` |Left GUI when held, `kc` when tapped |
|`RGUI_T(kc)`| |Right GUI when held, `kc` when tapped |
|`RALT_T(kc)`|`ALGR_T(kc)` |Right Alt 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)`|`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 |
|`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 |
|`RCAG_T(kc)`| |Right Control, Alt and GUI when held, `kc` when tapped |
|`ALL_T(kc)` | |Left Control, Shift, Alt and GUI when held, `kc` when tapped - more info [here](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)|
|`SCMD_T(kc)`|`SWIN_T(kc)`|Left Shift and GUI when held, `kc` when tapped |
|`SCMD_T(kc)`|`SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped |
|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped |
## [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md)

View File

@ -102,20 +102,20 @@ The basic set of keycodes are based on the [HID Keyboard/Keypad Usage Page (0x07
## Modifiers
|Key |Aliases |Description |
|-------------------|---------|------------------------------------|
|`KC_LCTRL` |`KC_LCTL`|Left Control |
|`KC_LSHIFT` |`KC_LSFT`|Left Shift |
|-------------------|--------------------|------------------------------------|
|`KC_LCTRL` |`KC_LCTL` |Left Control |
|`KC_LSHIFT` |`KC_LSFT` |Left Shift |
|`KC_LALT` | |Left Alt |
|`KC_LGUI` | |Left GUI (Windows/Command/Meta key) |
|`KC_RCTRL` |`KC_RCTL`|Right Control |
|`KC_RSHIFT` |`KC_RSFT`|Right Shift |
|`KC_LGUI` |`KC_LCMD`, `KC_LWIN`|Left GUI (Windows/Command/Meta key) |
|`KC_RCTRL` |`KC_RCTL` |Right Control |
|`KC_RSHIFT` |`KC_RSFT` |Right Shift |
|`KC_RALT` | |Right Alt |
|`KC_RGUI` | |Right GUI (Windows/Command/Meta key)|
|`KC_LOCKING_CAPS` |`KC_LCAP`|Locking Caps Lock |
|`KC_LOCKING_NUM` |`KC_LNUM`|Locking Num Lock |
|`KC_LOCKING_SCROLL`|`KC_LSCR`|Locking Scroll Lock |
|`KC_INT4` |`KC_HENK`|JIS Henkan |
|`KC_INT5` |`KC_MHEN`|JIS Muhenkan |
|`KC_RGUI` |`KC_RCMD`, `KC_RWIN`|Right GUI (Windows/Command/Meta key)|
|`KC_LOCKING_CAPS` |`KC_LCAP` |Locking Caps Lock |
|`KC_LOCKING_NUM` |`KC_LNUM` |Locking Num Lock |
|`KC_LOCKING_SCROLL`|`KC_LSCR` |Locking Scroll Lock |
|`KC_INT4` |`KC_HENK` |JIS Henkan |
|`KC_INT5` |`KC_MHEN` |JIS Muhenkan |
## Commands

View File

@ -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_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_LSFT(string) SS_DOWN(X_LSHIFT) string SS_UP(X_LSHIFT)
#define SS_RALT(string) SS_DOWN(X_RALT) string SS_UP(X_RALT)

View File

@ -449,10 +449,14 @@ enum quantum_keycodes {
#define LSFT(kc) (kc | QK_LSFT)
#define LALT(kc) (kc | QK_LALT)
#define LGUI(kc) (kc | QK_LGUI)
#define LCMD(kc) LGUI(kc)
#define LWIN(kc) LGUI(kc)
#define RCTL(kc) (kc | QK_RCTL)
#define RSFT(kc) (kc | QK_RSFT)
#define RALT(kc) (kc | QK_RALT)
#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 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 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 LCMD_T(kc) LGUI_T(kc)
#define LWIN_T(kc) LGUI_T(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 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

View File

@ -167,6 +167,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Transparent */
#define KC_TRANSPARENT 1
#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