summaryrefslogtreecommitdiff
path: root/quantum
diff options
context:
space:
mode:
authorJoshua Diamond <josh@windowoffire.com>2022-09-17 01:48:09 -0400
committerGitHub <noreply@github.com>2022-09-17 15:48:09 +1000
commita26f1ddafa05c04cc9446109db250c59f689b35a (patch)
tree5eb836bf0dd1959b9580fc18239c280e030ef965 /quantum
parent33c47fe0106b5b1ec307d81bc6ee92cce3be50d5 (diff)
Chromeos keycodes (#18212)
Diffstat (limited to 'quantum')
-rw-r--r--quantum/keycode.h8
-rw-r--r--quantum/keymap_common.c2
-rw-r--r--quantum/via_ensure_keycode.h2
3 files changed, 9 insertions, 3 deletions
diff --git a/quantum/keycode.h b/quantum/keycode.h
index 3c80a386d1..c2103ebaa7 100644
--- a/quantum/keycode.h
+++ b/quantum/keycode.h
@@ -33,7 +33,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define IS_SPECIAL(code) ((0xA5 <= (code) && (code) <= 0xDF) || (0xE8 <= (code) && (code) <= 0xFF))
#define IS_SYSTEM(code) (KC_PWR <= (code) && (code) <= KC_WAKE)
-#define IS_CONSUMER(code) (KC_MUTE <= (code) && (code) <= KC_BRID)
+#define IS_CONSUMER(code) (KC_MUTE <= (code) && (code) <= KC_ASST)
#define IS_MOUSEKEY(code) (KC_MS_UP <= (code) && (code) <= KC_MS_ACCEL2)
#define IS_MOUSEKEY_MOVE(code) (KC_MS_UP <= (code) && (code) <= KC_MS_RIGHT)
@@ -205,6 +205,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define KC_MRWD KC_MEDIA_REWIND
#define KC_BRIU KC_BRIGHTNESS_UP
#define KC_BRID KC_BRIGHTNESS_DOWN
+#define KC_CPNL KC_CONTROL_PANEL
+#define KC_ASST KC_ASSISTANT
/* System Specific */
#define KC_BRMU KC_PAUSE
@@ -502,7 +504,9 @@ enum internal_special_keycodes {
KC_MEDIA_FAST_FORWARD,
KC_MEDIA_REWIND,
KC_BRIGHTNESS_UP,
- KC_BRIGHTNESS_DOWN
+ KC_BRIGHTNESS_DOWN,
+ KC_CONTROL_PANEL,
+ KC_ASSISTANT // 0xC0
};
enum mouse_keys {
diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c
index 8d7a8bda9a..1d5ef9b403 100644
--- a/quantum/keymap_common.c
+++ b/quantum/keymap_common.c
@@ -61,7 +61,7 @@ action_t action_for_keycode(uint16_t keycode) {
case KC_SYSTEM_POWER ... KC_SYSTEM_WAKE:
action.code = ACTION_USAGE_SYSTEM(KEYCODE2SYSTEM(keycode));
break;
- case KC_AUDIO_MUTE ... KC_BRIGHTNESS_DOWN:
+ case KC_AUDIO_MUTE ... KC_ASSISTANT:
action.code = ACTION_USAGE_CONSUMER(KEYCODE2CONSUMER(keycode));
break;
#endif
diff --git a/quantum/via_ensure_keycode.h b/quantum/via_ensure_keycode.h
index 75f816b560..010e1d92d4 100644
--- a/quantum/via_ensure_keycode.h
+++ b/quantum/via_ensure_keycode.h
@@ -195,6 +195,8 @@ _Static_assert(KC_MFFD == 0x00BB, "");
_Static_assert(KC_MRWD == 0x00BC, "");
_Static_assert(KC_BRIU == 0x00BD, "");
_Static_assert(KC_BRID == 0x00BE, "");
+_Static_assert(KC_CPNL == 0x00BF, "");
+_Static_assert(KC_ASST == 0x00C0, "");
_Static_assert(KC_LEFT_CTRL == 0x00E0, "");
_Static_assert(KC_LEFT_SHIFT == 0x00E1, "");