Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Special Mac Keys that don't exist in current version. #9

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions keyboards/nuphy/air75_v2/ansi/ansi.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,24 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
}
return false;

case MAC_TASK:
if (record->event.pressed) {
host_consumer_send(0x029F);
} else {
host_consumer_send(0);
}
return false;

case MAC_SEARCH:
if (record->event.pressed) {
register_code(KC_LGUI);
register_code(KC_SPACE);
wait_ms(50);
unregister_code(KC_LGUI);
unregister_code(KC_SPACE);
}
return false;

case MAC_VOICE:
if (record->event.pressed) {
host_consumer_send(0xcf);
Expand All @@ -123,6 +141,14 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
}
return false;

case MAC_CONSOLE:
if (record->event.pressed) {
host_consumer_send(0x02A0);
} else {
host_consumer_send(0);
}
return false;

case MAC_DND:
if (record->event.pressed) {
host_system_send(0x9b);
Expand All @@ -131,6 +157,42 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
}
return false;

case MAC_PRT:
if (record->event.pressed) {
register_code(KC_LGUI);
register_code(KC_LSFT);
register_code(KC_3);
wait_ms(50);
unregister_code(KC_3);
unregister_code(KC_LSFT);
unregister_code(KC_LGUI);
}
return false;

case MAC_PRTA:
if (record->event.pressed) {
if (dev_info.sys_sw_state == SYS_SW_WIN) {
register_code(KC_LGUI);
register_code(KC_LSFT);
register_code(KC_S);
wait_ms(50);
unregister_code(KC_S);
unregister_code(KC_LSFT);
unregister_code(KC_LGUI);
}

else {
register_code(KC_LGUI);
register_code(KC_LSFT);
register_code(KC_4);
wait_ms(50);
unregister_code(KC_4);
unregister_code(KC_LSFT);
unregister_code(KC_LGUI);
}
}
return false;

case SIDE_VAI:
if (record->event.pressed) {
side_light_control(1);
Expand Down
5 changes: 5 additions & 0 deletions keyboards/nuphy/air75_v2/ansi/ansi.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ enum custom_keycodes {
LNK_BLE2,
LNK_BLE3,

MAC_TASK,
MAC_SEARCH,
MAC_VOICE,
MAC_CONSOLE,
MAC_PRT,
MAC_PRTA,
MAC_DND,

SIDE_VAI,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,10 @@
{ "name": "Link BT1", "title": "Link Mode BT1", "shortName": "Lnk BT1" },
{ "name": "Link BT2", "title": "Link Mode BT2", "shortName": "Lnk BT2" },
{ "name": "Link BT3", "title": "Link Mode BT3", "shortName": "Lnk BT3" },
{ "name": "Mac Task", "title": "Mac Task", "shortName": "Mac Task"},
{ "name": "Mac Search", "title": "Mac Search", "shortName": "Mac Search"},
{ "name": "Mac Voice", "title": "Mac Siri Voice", "shortName": "Mac Voice" },
{ "name": "Mac Console", "title": "Mac Console", "shortName": "Mac Console"},
{ "name": "Mac DND", "title": "Mac Do Not Disturb", "shortName": "Mac DND" },
{ "name": "Side Bri +", "title": "Side Brightness +", "shortName": "Side Bri+" },
{ "name": "Side Bri -", "title": "Side Brightness -", "shortName": "Side Bri-" },
Expand Down
Loading