diff --git a/src/driver-etekcity.c b/src/driver-etekcity.c index 0ec74898..853aad79 100644 --- a/src/driver-etekcity.c +++ b/src/driver-etekcity.c @@ -262,6 +262,8 @@ etekcity_has_capability(const struct ratbag_device *device, case RATBAG_DEVICE_CAP_BUTTON_KEY: case RATBAG_DEVICE_CAP_BUTTON_MACROS: return 1; + case RATBAG_DEVICE_CAP_DEFAULT_PROFILE: + return 0; } return 0; } diff --git a/src/driver-hidpp10.c b/src/driver-hidpp10.c index 276574bd..ef502208 100644 --- a/src/driver-hidpp10.c +++ b/src/driver-hidpp10.c @@ -104,6 +104,7 @@ hidpp10drv_has_capability(const struct ratbag_device *device, case RATBAG_DEVICE_CAP_SWITCHABLE_RESOLUTION: case RATBAG_DEVICE_CAP_BUTTON_KEY: case RATBAG_DEVICE_CAP_BUTTON_MACROS: + case RATBAG_DEVICE_CAP_DEFAULT_PROFILE: return (device->num_profiles > 1); } return 0; diff --git a/src/driver-hidpp20.c b/src/driver-hidpp20.c index c398da1a..42a3e3c9 100644 --- a/src/driver-hidpp20.c +++ b/src/driver-hidpp20.c @@ -149,6 +149,7 @@ hidpp20drv_has_capability(const struct ratbag_device *device, return !!(drv_data->capabilities & HIDPP_CAP_BUTTON_KEY_1b04); case RATBAG_DEVICE_CAP_SWITCHABLE_PROFILE: case RATBAG_DEVICE_CAP_BUTTON_MACROS: + case RATBAG_DEVICE_CAP_DEFAULT_PROFILE: return 0; } return 0; diff --git a/src/libratbag.h b/src/libratbag.h index be60309d..0b4ce9a8 100644 --- a/src/libratbag.h +++ b/src/libratbag.h @@ -435,6 +435,14 @@ enum ratbag_device_capability { * The device supports user-defined key or button sequences. */ RATBAG_DEVICE_CAP_BUTTON_MACROS, + + /** + * The device can have one profile assigned as a default profile. + * A default profile is the profile that is selected when the device + * is plugged in. Devices without this capability may select the + * last-used profile or a specific profile (usually the first). + */ + RATBAG_DEVICE_CAP_DEFAULT_PROFILE, }; /**