diff --git a/keyboards/nuphy/air75_v2/ansi/ansi.c b/keyboards/nuphy/air75_v2/ansi/ansi.c index 8ebd3c471196..864be5307b8d 100644 --- a/keyboards/nuphy/air75_v2/ansi/ansi.c +++ b/keyboards/nuphy/air75_v2/ansi/ansi.c @@ -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); @@ -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); @@ -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); diff --git a/keyboards/nuphy/air75_v2/ansi/ansi.h b/keyboards/nuphy/air75_v2/ansi/ansi.h index 8ffaca0432a8..fc4fe82f2766 100644 --- a/keyboards/nuphy/air75_v2/ansi/ansi.h +++ b/keyboards/nuphy/air75_v2/ansi/ansi.h @@ -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, diff --git a/keyboards/nuphy/air75_v2/ansi/keymaps/via/air75_v2_via_v3.json b/keyboards/nuphy/air75_v2/ansi/keymaps/via/air75_v2_via_v3.json index 2113601833f6..a51e3adb8295 100644 --- a/keyboards/nuphy/air75_v2/ansi/keymaps/via/air75_v2_via_v3.json +++ b/keyboards/nuphy/air75_v2/ansi/keymaps/via/air75_v2_via_v3.json @@ -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-" },