diff --git a/rootfs/usr/share/inputplumber/devices/50-anbernic_win600.yaml b/rootfs/usr/share/inputplumber/devices/50-anbernic_win600.yaml index ef5ecaa..2147411 100644 --- a/rootfs/usr/share/inputplumber/devices/50-anbernic_win600.yaml +++ b/rootfs/usr/share/inputplumber/devices/50-anbernic_win600.yaml @@ -33,6 +33,13 @@ source_devices: phys_path: isa0060/serio0/input0 handler: event* +# Optional configuration for the composite device +options: + # If true, InputPlumber will automatically try to manage the input device. If + # this is false, InputPlumber will not try to manage the device unless an + # external service enables management of the device. Defaults to 'false' + auto_manage: true + # The target input device(s) that the virtual device profile can use target_devices: - xb360 diff --git a/rootfs/usr/share/inputplumber/devices/50-aokzoe_a1.yaml b/rootfs/usr/share/inputplumber/devices/50-aokzoe_a1.yaml index b7f2134..a74062e 100644 --- a/rootfs/usr/share/inputplumber/devices/50-aokzoe_a1.yaml +++ b/rootfs/usr/share/inputplumber/devices/50-aokzoe_a1.yaml @@ -44,6 +44,13 @@ source_devices: iio: name: i2c-BMI0160:00 +# Optional configuration for the composite device +options: + # If true, InputPlumber will automatically try to manage the input device. If + # this is false, InputPlumber will not try to manage the device unless an + # external service enables management of the device. Defaults to 'false' + auto_manage: true + # The target input device(s) that the virtual device profile can use target_devices: - xb360 diff --git a/rootfs/usr/share/inputplumber/devices/50-ayaneo_2.yaml b/rootfs/usr/share/inputplumber/devices/50-ayaneo_2.yaml index 19044b2..851a1e9 100644 --- a/rootfs/usr/share/inputplumber/devices/50-ayaneo_2.yaml +++ b/rootfs/usr/share/inputplumber/devices/50-ayaneo_2.yaml @@ -48,6 +48,13 @@ source_devices: y: [0, 0, -1] z: [1, 0, 0] +# Optional configuration for the composite device +options: + # If true, InputPlumber will automatically try to manage the input device. If + # this is false, InputPlumber will not try to manage the device unless an + # external service enables management of the device. Defaults to 'false' + auto_manage: true + # The target input device(s) that the virtual device profile can use target_devices: - xb360 diff --git a/rootfs/usr/share/inputplumber/devices/50-ayaneo_2021.yaml b/rootfs/usr/share/inputplumber/devices/50-ayaneo_2021.yaml index f48c8af..34a3575 100644 --- a/rootfs/usr/share/inputplumber/devices/50-ayaneo_2021.yaml +++ b/rootfs/usr/share/inputplumber/devices/50-ayaneo_2021.yaml @@ -52,6 +52,13 @@ source_devices: y: [0, 0, -1] z: [1, 0, 0] +# Optional configuration for the composite device +options: + # If true, InputPlumber will automatically try to manage the input device. If + # this is false, InputPlumber will not try to manage the device unless an + # external service enables management of the device. Defaults to 'false' + auto_manage: true + # The target input device(s) that the virtual device profile can use target_devices: - xb360 diff --git a/rootfs/usr/share/inputplumber/devices/50-ayaneo_2s.yaml b/rootfs/usr/share/inputplumber/devices/50-ayaneo_2s.yaml index f0bdfbd..11b20dd 100644 --- a/rootfs/usr/share/inputplumber/devices/50-ayaneo_2s.yaml +++ b/rootfs/usr/share/inputplumber/devices/50-ayaneo_2s.yaml @@ -48,6 +48,13 @@ source_devices: y: [0, 0, -1] z: [1, 0, 0] +# Optional configuration for the composite device +options: + # If true, InputPlumber will automatically try to manage the input device. If + # this is false, InputPlumber will not try to manage the device unless an + # external service enables management of the device. Defaults to 'false' + auto_manage: true + # The target input device(s) that the virtual device profile can use target_devices: - xb360 diff --git a/rootfs/usr/share/inputplumber/devices/50-ayaneo_air.yaml b/rootfs/usr/share/inputplumber/devices/50-ayaneo_air.yaml index 4abf518..7fbbd39 100644 --- a/rootfs/usr/share/inputplumber/devices/50-ayaneo_air.yaml +++ b/rootfs/usr/share/inputplumber/devices/50-ayaneo_air.yaml @@ -43,6 +43,13 @@ source_devices: # y: [0, 0, -1] # z: [1, 0, 0] +# Optional configuration for the composite device +options: + # If true, InputPlumber will automatically try to manage the input device. If + # this is false, InputPlumber will not try to manage the device unless an + # external service enables management of the device. Defaults to 'false' + auto_manage: true + # The target input device(s) that the virtual device profile can use target_devices: - xb360 diff --git a/rootfs/usr/share/inputplumber/devices/50-ayaneo_air_1s.yaml b/rootfs/usr/share/inputplumber/devices/50-ayaneo_air_1s.yaml index ebe4189..13447ef 100644 --- a/rootfs/usr/share/inputplumber/devices/50-ayaneo_air_1s.yaml +++ b/rootfs/usr/share/inputplumber/devices/50-ayaneo_air_1s.yaml @@ -44,6 +44,13 @@ source_devices: iio: name: i2c-BMI0160:00 +# Optional configuration for the composite device +options: + # If true, InputPlumber will automatically try to manage the input device. If + # this is false, InputPlumber will not try to manage the device unless an + # external service enables management of the device. Defaults to 'false' + auto_manage: true + # The target input device(s) that the virtual device profile can use target_devices: - xb360 diff --git a/rootfs/usr/share/inputplumber/devices/50-ayaneo_air_plus.yaml b/rootfs/usr/share/inputplumber/devices/50-ayaneo_air_plus.yaml index 222f986..b9d27a3 100644 --- a/rootfs/usr/share/inputplumber/devices/50-ayaneo_air_plus.yaml +++ b/rootfs/usr/share/inputplumber/devices/50-ayaneo_air_plus.yaml @@ -55,6 +55,13 @@ source_devices: y: [0, 0, 1] z: [-1, 0, 0] +# Optional configuration for the composite device +options: + # If true, InputPlumber will automatically try to manage the input device. If + # this is false, InputPlumber will not try to manage the device unless an + # external service enables management of the device. Defaults to 'false' + auto_manage: true + # The target input device(s) that the virtual device profile can use target_devices: - xb360 diff --git a/rootfs/usr/share/inputplumber/devices/50-ayaneo_air_plus_mendo.yaml b/rootfs/usr/share/inputplumber/devices/50-ayaneo_air_plus_mendo.yaml index 5458fc5..cde4967 100644 --- a/rootfs/usr/share/inputplumber/devices/50-ayaneo_air_plus_mendo.yaml +++ b/rootfs/usr/share/inputplumber/devices/50-ayaneo_air_plus_mendo.yaml @@ -46,6 +46,13 @@ source_devices: y: [0, 0, 1] z: [-1, 0, 0] +# Optional configuration for the composite device +options: + # If true, InputPlumber will automatically try to manage the input device. If + # this is false, InputPlumber will not try to manage the device unless an + # external service enables management of the device. Defaults to 'false' + auto_manage: true + # The target input device(s) that the virtual device profile can use target_devices: - xb360 diff --git a/rootfs/usr/share/inputplumber/devices/50-ayaneo_flip.yaml b/rootfs/usr/share/inputplumber/devices/50-ayaneo_flip.yaml index e4eaeb2..2571b0e 100644 --- a/rootfs/usr/share/inputplumber/devices/50-ayaneo_flip.yaml +++ b/rootfs/usr/share/inputplumber/devices/50-ayaneo_flip.yaml @@ -48,6 +48,13 @@ source_devices: y: [0, 0, -1] z: [1, 0, 0] +# Optional configuration for the composite device +options: + # If true, InputPlumber will automatically try to manage the input device. If + # this is false, InputPlumber will not try to manage the device unless an + # external service enables management of the device. Defaults to 'false' + auto_manage: true + # The target input device(s) that the virtual device profile can use target_devices: - xb360 diff --git a/rootfs/usr/share/inputplumber/devices/50-ayaneo_kun.yaml b/rootfs/usr/share/inputplumber/devices/50-ayaneo_kun.yaml index c1b21f7..f5d4c00 100644 --- a/rootfs/usr/share/inputplumber/devices/50-ayaneo_kun.yaml +++ b/rootfs/usr/share/inputplumber/devices/50-ayaneo_kun.yaml @@ -41,6 +41,13 @@ source_devices: iio: name: i2c-BMI0160:00 +# Optional configuration for the composite device +options: + # If true, InputPlumber will automatically try to manage the input device. If + # this is false, InputPlumber will not try to manage the device unless an + # external service enables management of the device. Defaults to 'false' + auto_manage: true + # The target input device(s) that the virtual device profile can use target_devices: - xb360 diff --git a/rootfs/usr/share/inputplumber/devices/50-ayaneo_next.yaml b/rootfs/usr/share/inputplumber/devices/50-ayaneo_next.yaml index 238068f..ee0f75a 100644 --- a/rootfs/usr/share/inputplumber/devices/50-ayaneo_next.yaml +++ b/rootfs/usr/share/inputplumber/devices/50-ayaneo_next.yaml @@ -58,6 +58,13 @@ source_devices: y: [0, 0, -1] z: [1, 0, 0] +# Optional configuration for the composite device +options: + # If true, InputPlumber will automatically try to manage the input device. If + # this is false, InputPlumber will not try to manage the device unless an + # external service enables management of the device. Defaults to 'false' + auto_manage: true + # The target input device(s) that the virtual device profile can use target_devices: - xb360 diff --git a/rootfs/usr/share/inputplumber/devices/50-ayaneo_slide.yaml b/rootfs/usr/share/inputplumber/devices/50-ayaneo_slide.yaml index 125a55b..8c9bf4d 100644 --- a/rootfs/usr/share/inputplumber/devices/50-ayaneo_slide.yaml +++ b/rootfs/usr/share/inputplumber/devices/50-ayaneo_slide.yaml @@ -41,6 +41,13 @@ source_devices: iio: name: i2c-BMI0160:00 +# Optional configuration for the composite device +options: + # If true, InputPlumber will automatically try to manage the input device. If + # this is false, InputPlumber will not try to manage the device unless an + # external service enables management of the device. Defaults to 'false' + auto_manage: true + # The target input device(s) that the virtual device profile can use target_devices: - xb360 diff --git a/rootfs/usr/share/inputplumber/devices/50-ayn_loki_max.yaml b/rootfs/usr/share/inputplumber/devices/50-ayn_loki_max.yaml index 6b2838f..269785b 100644 --- a/rootfs/usr/share/inputplumber/devices/50-ayn_loki_max.yaml +++ b/rootfs/usr/share/inputplumber/devices/50-ayn_loki_max.yaml @@ -40,6 +40,13 @@ source_devices: y: [0, 0, -1] z: [0, 1, 0] +# Optional configuration for the composite device +options: + # If true, InputPlumber will automatically try to manage the input device. If + # this is false, InputPlumber will not try to manage the device unless an + # external service enables management of the device. Defaults to 'false' + auto_manage: true + # The target input device(s) that the virtual device profile can use target_devices: - xb360 diff --git a/rootfs/usr/share/inputplumber/devices/50-ayn_loki_mini_pro.yaml b/rootfs/usr/share/inputplumber/devices/50-ayn_loki_mini_pro.yaml index bee3bdf..7e0efea 100644 --- a/rootfs/usr/share/inputplumber/devices/50-ayn_loki_mini_pro.yaml +++ b/rootfs/usr/share/inputplumber/devices/50-ayn_loki_mini_pro.yaml @@ -40,6 +40,13 @@ source_devices: y: [0, 0, -1] z: [0, 1, 0] +# Optional configuration for the composite device +options: + # If true, InputPlumber will automatically try to manage the input device. If + # this is false, InputPlumber will not try to manage the device unless an + # external service enables management of the device. Defaults to 'false' + auto_manage: true + # The target input device(s) that the virtual device profile can use target_devices: - xb360 diff --git a/rootfs/usr/share/inputplumber/devices/50-ayn_loki_zero.yaml b/rootfs/usr/share/inputplumber/devices/50-ayn_loki_zero.yaml index bb6b5be..047f7d0 100644 --- a/rootfs/usr/share/inputplumber/devices/50-ayn_loki_zero.yaml +++ b/rootfs/usr/share/inputplumber/devices/50-ayn_loki_zero.yaml @@ -40,6 +40,13 @@ source_devices: # y: [0, 0, -1] # z: [0, 1, 0] +# Optional configuration for the composite device +options: + # If true, InputPlumber will automatically try to manage the input device. If + # this is false, InputPlumber will not try to manage the device unless an + # external service enables management of the device. Defaults to 'false' + auto_manage: true + # The target input device(s) that the virtual device profile can use target_devices: - xb360 diff --git a/rootfs/usr/share/inputplumber/devices/50-gpd_win3.yaml b/rootfs/usr/share/inputplumber/devices/50-gpd_win3.yaml index fbb54c5..a995aaa 100644 --- a/rootfs/usr/share/inputplumber/devices/50-gpd_win3.yaml +++ b/rootfs/usr/share/inputplumber/devices/50-gpd_win3.yaml @@ -36,6 +36,13 @@ source_devices: iio: name: i2c-BMI0160:00 +# Optional configuration for the composite device +options: + # If true, InputPlumber will automatically try to manage the input device. If + # this is false, InputPlumber will not try to manage the device unless an + # external service enables management of the device. Defaults to 'false' + auto_manage: true + # The target input device(s) that the virtual device profile can use target_devices: - xbox-elite diff --git a/rootfs/usr/share/inputplumber/devices/50-gpd_win4.yaml b/rootfs/usr/share/inputplumber/devices/50-gpd_win4.yaml index f49edf7..4882a0b 100644 --- a/rootfs/usr/share/inputplumber/devices/50-gpd_win4.yaml +++ b/rootfs/usr/share/inputplumber/devices/50-gpd_win4.yaml @@ -36,6 +36,13 @@ source_devices: iio: name: i2c-BMI0160:00 +# Optional configuration for the composite device +options: + # If true, InputPlumber will automatically try to manage the input device. If + # this is false, InputPlumber will not try to manage the device unless an + # external service enables management of the device. Defaults to 'false' + auto_manage: true + # The target input device(s) that the virtual device profile can use target_devices: - xbox-elite diff --git a/rootfs/usr/share/inputplumber/devices/50-gpd_winmax2.yaml b/rootfs/usr/share/inputplumber/devices/50-gpd_winmax2.yaml index d1651f1..2f332d7 100644 --- a/rootfs/usr/share/inputplumber/devices/50-gpd_winmax2.yaml +++ b/rootfs/usr/share/inputplumber/devices/50-gpd_winmax2.yaml @@ -36,6 +36,13 @@ source_devices: iio: name: i2c-BMI0160:00 +# Optional configuration for the composite device +options: + # If true, InputPlumber will automatically try to manage the input device. If + # this is false, InputPlumber will not try to manage the device unless an + # external service enables management of the device. Defaults to 'false' + auto_manage: true + # The target input device(s) that the virtual device profile can use target_devices: - xbox-elite diff --git a/rootfs/usr/share/inputplumber/devices/50-gpd_winmini.yaml b/rootfs/usr/share/inputplumber/devices/50-gpd_winmini.yaml index 41f4152..3fb6ad6 100644 --- a/rootfs/usr/share/inputplumber/devices/50-gpd_winmini.yaml +++ b/rootfs/usr/share/inputplumber/devices/50-gpd_winmini.yaml @@ -36,6 +36,13 @@ source_devices: iio: name: i2c-BMI0160:00 +# Optional configuration for the composite device +options: + # If true, InputPlumber will automatically try to manage the input device. If + # this is false, InputPlumber will not try to manage the device unless an + # external service enables management of the device. Defaults to 'false' + auto_manage: true + # The target input device(s) that the virtual device profile can use target_devices: - xbox-elite diff --git a/rootfs/usr/share/inputplumber/devices/50-legion_go.yaml b/rootfs/usr/share/inputplumber/devices/50-legion_go.yaml index 208556a..16251bf 100644 --- a/rootfs/usr/share/inputplumber/devices/50-legion_go.yaml +++ b/rootfs/usr/share/inputplumber/devices/50-legion_go.yaml @@ -149,6 +149,13 @@ source_devices: y: [0, 0, -1] z: [-1, 0, 0] +# Optional configuration for the composite device +options: + # If true, InputPlumber will automatically try to manage the input device. If + # this is false, InputPlumber will not try to manage the device unless an + # external service enables management of the device. Defaults to 'false' + auto_manage: true + # The target input device(s) that the virtual device profile can use target_devices: - xbox-elite diff --git a/rootfs/usr/share/inputplumber/devices/50-msi_claw.yaml b/rootfs/usr/share/inputplumber/devices/50-msi_claw.yaml index 189e2eb..a0e38bd 100644 --- a/rootfs/usr/share/inputplumber/devices/50-msi_claw.yaml +++ b/rootfs/usr/share/inputplumber/devices/50-msi_claw.yaml @@ -51,6 +51,13 @@ source_devices: y: [0, 0, -1] z: [-1, 0, 0] +# Optional configuration for the composite device +options: + # If true, InputPlumber will automatically try to manage the input device. If + # this is false, InputPlumber will not try to manage the device unless an + # external service enables management of the device. Defaults to 'false' + auto_manage: true + # The target input device(s) that the virtual device profile can use target_devices: - xbox-elite diff --git a/rootfs/usr/share/inputplumber/devices/50-onexplayer_2.yaml b/rootfs/usr/share/inputplumber/devices/50-onexplayer_2.yaml index 2a9a536..dd205f9 100644 --- a/rootfs/usr/share/inputplumber/devices/50-onexplayer_2.yaml +++ b/rootfs/usr/share/inputplumber/devices/50-onexplayer_2.yaml @@ -47,6 +47,13 @@ source_devices: iio: name: i2c-BMI0160:00 +# Optional configuration for the composite device +options: + # If true, InputPlumber will automatically try to manage the input device. If + # this is false, InputPlumber will not try to manage the device unless an + # external service enables management of the device. Defaults to 'false' + auto_manage: true + # The target input device(s) that the virtual device profile can use target_devices: - xb360 diff --git a/rootfs/usr/share/inputplumber/devices/50-onexplayer_amd.yaml b/rootfs/usr/share/inputplumber/devices/50-onexplayer_amd.yaml index 2a164b3..a9f7805 100644 --- a/rootfs/usr/share/inputplumber/devices/50-onexplayer_amd.yaml +++ b/rootfs/usr/share/inputplumber/devices/50-onexplayer_amd.yaml @@ -58,6 +58,13 @@ source_devices: iio: name: i2c-BMI0160:00 +# Optional configuration for the composite device +options: + # If true, InputPlumber will automatically try to manage the input device. If + # this is false, InputPlumber will not try to manage the device unless an + # external service enables management of the device. Defaults to 'false' + auto_manage: true + # The target input device(s) that the virtual device profile can use target_devices: - xb360 diff --git a/rootfs/usr/share/inputplumber/devices/50-onexplayer_intel.yaml b/rootfs/usr/share/inputplumber/devices/50-onexplayer_intel.yaml index 54dc833..8eba4cf 100644 --- a/rootfs/usr/share/inputplumber/devices/50-onexplayer_intel.yaml +++ b/rootfs/usr/share/inputplumber/devices/50-onexplayer_intel.yaml @@ -38,6 +38,13 @@ source_devices: phys_path: isa0060/serio0/input0 handler: event* +# Optional configuration for the composite device +options: + # If true, InputPlumber will automatically try to manage the input device. If + # this is false, InputPlumber will not try to manage the device unless an + # external service enables management of the device. Defaults to 'false' + auto_manage: true + # The target input device(s) that the virtual device profile can use target_devices: - xb360 diff --git a/rootfs/usr/share/inputplumber/devices/50-onexplayer_mini_a07.yaml b/rootfs/usr/share/inputplumber/devices/50-onexplayer_mini_a07.yaml index 8d8206a..1cdb44b 100644 --- a/rootfs/usr/share/inputplumber/devices/50-onexplayer_mini_a07.yaml +++ b/rootfs/usr/share/inputplumber/devices/50-onexplayer_mini_a07.yaml @@ -37,6 +37,13 @@ source_devices: iio: name: i2c-BMI0160:00 +# Optional configuration for the composite device +options: + # If true, InputPlumber will automatically try to manage the input device. If + # this is false, InputPlumber will not try to manage the device unless an + # external service enables management of the device. Defaults to 'false' + auto_manage: true + # The target input device(s) that the virtual device profile can use target_devices: - xb360 diff --git a/rootfs/usr/share/inputplumber/devices/50-onexplayer_mini_pro.yaml b/rootfs/usr/share/inputplumber/devices/50-onexplayer_mini_pro.yaml index caf772b..4e64ec4 100644 --- a/rootfs/usr/share/inputplumber/devices/50-onexplayer_mini_pro.yaml +++ b/rootfs/usr/share/inputplumber/devices/50-onexplayer_mini_pro.yaml @@ -36,6 +36,13 @@ source_devices: iio: name: i2c-BMI0160:00 +# Optional configuration for the composite device +options: + # If true, InputPlumber will automatically try to manage the input device. If + # this is false, InputPlumber will not try to manage the device unless an + # external service enables management of the device. Defaults to 'false' + auto_manage: true + # The target input device(s) that the virtual device profile can use target_devices: - xb360 diff --git a/rootfs/usr/share/inputplumber/devices/50-onexplayer_onexfly.yaml b/rootfs/usr/share/inputplumber/devices/50-onexplayer_onexfly.yaml index 171bca8..5e4054a 100644 --- a/rootfs/usr/share/inputplumber/devices/50-onexplayer_onexfly.yaml +++ b/rootfs/usr/share/inputplumber/devices/50-onexplayer_onexfly.yaml @@ -36,6 +36,13 @@ source_devices: iio: name: i2c-BMI0160:00 +# Optional configuration for the composite device +options: + # If true, InputPlumber will automatically try to manage the input device. If + # this is false, InputPlumber will not try to manage the device unless an + # external service enables management of the device. Defaults to 'false' + auto_manage: true + # The target input device(s) that the virtual device profile can use target_devices: - xb360 diff --git a/rootfs/usr/share/inputplumber/devices/50-orangepi_neo.yaml b/rootfs/usr/share/inputplumber/devices/50-orangepi_neo.yaml index 8269056..c60e69c 100644 --- a/rootfs/usr/share/inputplumber/devices/50-orangepi_neo.yaml +++ b/rootfs/usr/share/inputplumber/devices/50-orangepi_neo.yaml @@ -65,6 +65,13 @@ source_devices: y: [0, 0, -1] z: [0, -1, 0] +# Optional configuration for the composite device +options: + # If true, InputPlumber will automatically try to manage the input device. If + # this is false, InputPlumber will not try to manage the device unless an + # external service enables management of the device. Defaults to 'false' + auto_manage: true + # The target input device(s) that the virtual device profile can use target_devices: - xbox-elite diff --git a/rootfs/usr/share/inputplumber/devices/50-rog_ally.yaml b/rootfs/usr/share/inputplumber/devices/50-rog_ally.yaml index 65164ca..55ea482 100644 --- a/rootfs/usr/share/inputplumber/devices/50-rog_ally.yaml +++ b/rootfs/usr/share/inputplumber/devices/50-rog_ally.yaml @@ -54,6 +54,13 @@ source_devices: y: [0, 0, -1] z: [0, 1, 0] +# Optional configuration for the composite device +options: + # If true, InputPlumber will automatically try to manage the input device. If + # this is false, InputPlumber will not try to manage the device unless an + # external service enables management of the device. Defaults to 'false' + auto_manage: true + # The target input device(s) that the virtual device profile can use target_devices: - xbox-elite diff --git a/rootfs/usr/share/inputplumber/devices/50-rog_ally_x.yaml b/rootfs/usr/share/inputplumber/devices/50-rog_ally_x.yaml index a93568e..ad42f5c 100644 --- a/rootfs/usr/share/inputplumber/devices/50-rog_ally_x.yaml +++ b/rootfs/usr/share/inputplumber/devices/50-rog_ally_x.yaml @@ -53,6 +53,13 @@ source_devices: y: [0, 0, -1] z: [0, 1, 0] +# Optional configuration for the composite device +options: + # If true, InputPlumber will automatically try to manage the input device. If + # this is false, InputPlumber will not try to manage the device unless an + # external service enables management of the device. Defaults to 'false' + auto_manage: true + # The target input device(s) that the virtual device profile can use target_devices: - xbox-elite diff --git a/rootfs/usr/share/inputplumber/devices/50-steam_deck.yaml b/rootfs/usr/share/inputplumber/devices/50-steam_deck.yaml index a2ee38a..d6fe081 100644 --- a/rootfs/usr/share/inputplumber/devices/50-steam_deck.yaml +++ b/rootfs/usr/share/inputplumber/devices/50-steam_deck.yaml @@ -51,6 +51,13 @@ source_devices: phys_path: isa0060/serio0/input0 handler: event* +# Optional configuration for the composite device +options: + # If true, InputPlumber will automatically try to manage the input device. If + # this is false, InputPlumber will not try to manage the device unless an + # external service enables management of the device. Defaults to 'false' + auto_manage: true + # The target input device(s) that the virtual device profile can use target_devices: - xbox-elite diff --git a/rootfs/usr/share/inputplumber/schema/composite_device_v1.json b/rootfs/usr/share/inputplumber/schema/composite_device_v1.json index ddfe391..5fab4ce 100644 --- a/rootfs/usr/share/inputplumber/schema/composite_device_v1.json +++ b/rootfs/usr/share/inputplumber/schema/composite_device_v1.json @@ -42,6 +42,9 @@ "description": "The ID of a device event mapping in the 'capability_maps' directory", "type": "string" }, + "options": { + "$ref": "#/definitions/Options" + }, "target_devices": { "description": "Target input device(s) to emulate. Can be one of ['mouse', 'keyboard', 'gamepad', 'xb360', 'xbox-elite', 'xbox-series', 'deck', 'ds5', 'ds5-edge', 'touchscreen', 'touchpad'].", "type": "array", @@ -72,6 +75,19 @@ ], "title": "CompositeDevice" }, + "Options": { + "description": "Optional configuration for the composite device", + "type": "object", + "additionalProperties": false, + "properties": { + "auto_manage": { + "description": "If true, InputPlumber will automatically try to manage the input device. If this is false, InputPlumber will not try to manage the device unless an external service enables management of the device. Defaults to 'false'", + "type": "boolean", + "default": false + } + }, + "title": "Options" + }, "Match": { "description": "Only use this configuration if *any* of the given items match the system. If this list is empty, then matching source devices will always create a CompositeDevice.", "type": "object", diff --git a/src/config/mod.rs b/src/config/mod.rs index 583fe90..6b0c7b5 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -268,7 +268,17 @@ pub struct TouchMotionCapability { pub speed_pps: Option, } -/// Defines a platform match for loading a [CompositeDevice] +/// Defines available options for loading a [CompositeDeviceConfig] +#[derive(Debug, Deserialize, Clone, PartialEq)] +#[serde(rename_all = "snake_case")] +pub struct CompositeDeviceConfigOptions { + /// If true, InputPlumber will automatically try to manage the input device. + /// If this is false, InputPlumber will not try to manage the device unless + /// an external service enables management of all devices. + pub auto_manage: Option, +} + +/// Defines a platform match for loading a [CompositeDeviceConfig] #[derive(Debug, Deserialize, Clone, PartialEq)] #[serde(rename_all = "snake_case")] pub struct Match { @@ -352,6 +362,7 @@ pub struct CompositeDeviceConfig { pub capability_map_id: Option, pub source_devices: Vec, pub target_devices: Option>, + pub options: Option, } impl CompositeDeviceConfig { diff --git a/src/dbus/interface/manager.rs b/src/dbus/interface/manager.rs index ee63434..030c718 100644 --- a/src/dbus/interface/manager.rs +++ b/src/dbus/interface/manager.rs @@ -29,6 +29,37 @@ impl ManagerInterface { Ok("InputPlumber".to_string()) } + /// If set to 'true', InputPlumber will try to manage all input devices + /// on the system that have a Composite Device configuration. + #[zbus(property)] + async fn manage_all_devices(&self) -> fdo::Result { + let (sender, mut receiver) = mpsc::channel(1); + self.tx + .send_timeout( + ManagerCommand::GetManageAllDevices { sender }, + Duration::from_millis(500), + ) + .await + .map_err(|err| fdo::Error::Failed(err.to_string()))?; + + // Read the response from the manager + let Some(response) = receiver.recv().await else { + return Err(fdo::Error::Failed("No response from manager".to_string())); + }; + Ok(response) + } + #[zbus(property)] + async fn set_manage_all_devices(&self, value: bool) -> zbus::Result<()> { + self.tx + .send_timeout( + ManagerCommand::SetManageAllDevices(value), + Duration::from_millis(500), + ) + .await + .map_err(|err| zbus::Error::Failure(err.to_string()))?; + Ok(()) + } + /// Returns a list of supported target device names. E.g. ["InputPlumber Mouse", "Microsoft /// XBox 360 Gamepad"] #[zbus(property)] diff --git a/src/input/manager.rs b/src/input/manager.rs index d094ca4..6c9b3a6 100644 --- a/src/input/manager.rs +++ b/src/input/manager.rs @@ -89,6 +89,10 @@ pub enum ManagerCommand { path: String, }, CompositeDeviceStopped(String), + GetManageAllDevices { + sender: mpsc::Sender, + }, + SetManageAllDevices(bool), } /// Manages input devices @@ -142,6 +146,9 @@ pub struct Manager { /// Mapping of target devices to their respective handles /// E.g. {"/org/shadowblip/InputPlumber/devices/target/dbus0": } target_devices: HashMap, + /// Defines whether or not InputPlumber should try to automatically manage all + /// input devices that have a [CompositeDeviceConfig] definition + manage_all_devices: bool, } impl Manager { @@ -177,6 +184,7 @@ impl Manager { used_configs: HashMap::new(), composite_device_sources: HashMap::new(), composite_device_targets: HashMap::new(), + manage_all_devices: false, } } @@ -291,6 +299,48 @@ impl Manager { log::error!("Error removing device: {e:?}"); } } + ManagerCommand::SetManageAllDevices(manage_all_devices) => { + log::debug!("Setting management of all devices to: {manage_all_devices}"); + if self.manage_all_devices == manage_all_devices { + continue; + } + self.manage_all_devices = manage_all_devices; + + // If management of all devices was enabled, trigger device discovery + if manage_all_devices { + let cmd_tx = self.tx.clone(); + tokio::task::spawn(async move { + if let Err(e) = Manager::discover_all_devices(&cmd_tx).await { + log::error!("Failed to trigger device discovery: {e:?}"); + } + }); + continue; + } + + // If management was disabled, stop any composite devices that + // are not auto-managed. + for (dbus_path, config) in self.used_configs.iter() { + if let Some(options) = config.options.as_ref() { + let auto_managed = options.auto_manage.unwrap_or(false); + if auto_managed { + continue; + } + } + + log::debug!("Found composite device that should not be managed anymore: {dbus_path}"); + let Some(device) = self.composite_devices.get(dbus_path) else { + continue; + }; + if let Err(e) = device.stop().await { + log::error!("Failed to stop composite device: {e:?}"); + } + } + } + ManagerCommand::GetManageAllDevices { sender } => { + if let Err(e) = sender.send(self.manage_all_devices).await { + log::error!("Failed to send response: {e:?}"); + } + } } } @@ -822,6 +872,22 @@ impl Manager { for config in configs { log::trace!("Checking config {:?} for device", config.name); + // Check to see if 'auto_manage' is enabled for this config. + let auto_manage = { + if let Some(options) = config.options.as_ref() { + options.auto_manage.unwrap_or(false) + } else { + false + } + }; + if !self.manage_all_devices && !auto_manage { + log::trace!( + "Config {:?} does not have 'auto_manage' option enabled. Skipping.", + config.name + ); + continue; + } + // Check to see if this configuration matches the system if !config.has_valid_matches(&self.dmi_data, &self.cpu_info) { log::trace!("Configuration does not match system"); @@ -1327,17 +1393,14 @@ impl Manager { async fn watch_input_devices(&self) -> Result<(), Box> { log::debug!("Performing initial input device discovery"); let cmd_tx = self.tx.clone(); - let hidraw_devices = udev::discover_devices("hidraw")?; - let hidraw_devices = hidraw_devices.into_iter().map(|dev| dev.into()).collect(); - Manager::discover_devices(&cmd_tx, hidraw_devices).await?; - let event_devices = udev::discover_devices("input")?; - let event_devices = event_devices.into_iter().map(|dev| dev.into()).collect(); - Manager::discover_devices(&cmd_tx, event_devices).await?; - let iio_devices = udev::discover_devices("iio")?; - let iio_devices = iio_devices.into_iter().map(|dev| dev.into()).collect(); - Manager::discover_devices(&cmd_tx, iio_devices).await?; + task::spawn(async move { + if let Err(e) = Manager::discover_all_devices(&cmd_tx).await { + log::error!("Failed to perform initial device discovery: {e:?}"); + } + }); // Watch for IIO device events. + let cmd_tx = self.tx.clone(); task::spawn_blocking(move || { let mut monitor = MonitorBuilder::new()?.match_subsystem("iio")?.listen()?; @@ -1489,6 +1552,23 @@ impl Manager { Ok(()) } + /// Performs initial input device discovery of all supported subsystems + async fn discover_all_devices( + cmd_tx: &mpsc::Sender, + ) -> Result<(), Box> { + let hidraw_devices = udev::discover_devices("hidraw")?; + let hidraw_devices = hidraw_devices.into_iter().map(|dev| dev.into()).collect(); + Manager::discover_devices(cmd_tx, hidraw_devices).await?; + let event_devices = udev::discover_devices("input")?; + let event_devices = event_devices.into_iter().map(|dev| dev.into()).collect(); + Manager::discover_devices(cmd_tx, event_devices).await?; + let iio_devices = udev::discover_devices("iio")?; + let iio_devices = iio_devices.into_iter().map(|dev| dev.into()).collect(); + Manager::discover_devices(cmd_tx, iio_devices).await?; + + Ok(()) + } + async fn discover_devices( manager_tx: &mpsc::Sender, devices: Vec, @@ -1607,7 +1687,13 @@ impl Manager { async fn listen_on_dbus(&self) -> Result<(), Box> { let iface = ManagerInterface::new(self.tx.clone()); let manager_path = format!("{}/Manager", BUS_PREFIX); - self.dbus.object_server().at(manager_path, iface).await?; + let dbus = self.dbus.clone(); + task::spawn(async move { + if let Err(e) = dbus.object_server().at(manager_path, iface).await { + log::error!("Failed create manager dbus interface: {e:?}"); + } + }); + Ok(()) }