diff --git a/src/apps/SettingsWindow/Resources/simple_modifications.json b/src/apps/SettingsWindow/Resources/simple_modifications.json index a5524028b..90f9def85 100644 --- a/src/apps/SettingsWindow/Resources/simple_modifications.json +++ b/src/apps/SettingsWindow/Resources/simple_modifications.json @@ -2483,6 +2483,10 @@ { "category": "Application Launch keys" }, + { + "label": "al_consumer_control_configuration", + "data": [{ "consumer_key_code": "al_consumer_control_configuration" }] + }, { "label": "al_word_processor", "data": [{ "consumer_key_code": "al_word_processor" }] diff --git a/src/core/grabber/include/grabber/device_grabber_details/fn_function_keys_manipulator_manager.hpp b/src/core/grabber/include/grabber/device_grabber_details/fn_function_keys_manipulator_manager.hpp index 3099d98b9..748adb3be 100644 --- a/src/core/grabber/include/grabber/device_grabber_details/fn_function_keys_manipulator_manager.hpp +++ b/src/core/grabber/include/grabber/device_grabber_details/fn_function_keys_manipulator_manager.hpp @@ -213,6 +213,13 @@ class fn_function_keys_manipulator_manager final { { nlohmann::json data = nlohmann::json::array(); + // Typically al_consumer_control_configuration is used as the key to open the music player. + // https://source.android.com/docs/core/interaction/input/keyboard-devices + data.push_back(nlohmann::json::object({ + {"from", nlohmann::json::object({{"consumer_key_code", "al_consumer_control_configuration"}})}, + {"to", nlohmann::json::object({{"shell_command", "open -a 'Music.app'"}})}, + })); + data.push_back(nlohmann::json::object({ {"from", nlohmann::json::object({{"consumer_key_code", "al_word_processor"}})}, {"to", nlohmann::json::object({{"shell_command", "open -a 'Pages.app'"}})}, diff --git a/src/share/types/momentary_switch_event_details/consumer_key_code.hpp b/src/share/types/momentary_switch_event_details/consumer_key_code.hpp index 8f84459bb..1b01b2784 100644 --- a/src/share/types/momentary_switch_event_details/consumer_key_code.hpp +++ b/src/share/types/momentary_switch_event_details/consumer_key_code.hpp @@ -52,6 +52,7 @@ constexpr std::pair<const mapbox::eternal::string, const pqrs::hid::usage::value {"volume_decrement", pqrs::hid::usage::consumer::volume_decrement}, // Application launch buttons + {"al_consumer_control_configuration", pqrs::hid::usage::consumer::al_consumer_control_configuration}, {"al_word_processor", pqrs::hid::usage::consumer::al_word_processor}, {"al_text_editor", pqrs::hid::usage::consumer::al_text_editor}, {"al_spreadsheet", pqrs::hid::usage::consumer::al_spreadsheet},