From 06e5e98d0ebf4fb0dece771ca847d7c3b3721af4 Mon Sep 17 00:00:00 2001 From: William Edwards Date: Sat, 30 Mar 2024 23:28:34 -0700 Subject: [PATCH] chore(docs): update README and dbus XML --- Cargo.lock | 2 +- Makefile | 31 +++- README.md | 173 +++++++++++++++++- .../org.shadowblip.Input.CompositeDevice.xml | 28 ++- .../org.shadowblip.Input.DBusDevice.xml | 14 +- .../dbus-xml/org.shadowblip.Input.Gamepad.xml | 48 +++++ ...oard => org.shadowblip.Input.Keyboard.xml} | 10 +- .../dbus-xml/org.shadowblip.Input.Manager.xml | 24 +-- .../dbus-xml/org.shadowblip.Input.Mouse.xml | 48 +++++ ...rg.shadowblip.Input.Source.EventDevice.xml | 46 ++--- ...g.shadowblip.Input.Source.HIDRawDevice.xml | 20 +- docs/composite_device.md | 82 ++++++--- docs/manager.md | 98 ++++++---- docs/source_event_device.md | 107 +++++++---- docs/source_hidraw_device.md | 89 +++++---- .../{target_dbus_device.md => target_dbus.md} | 90 ++++++--- docs/target_gamepad.md | 115 ++++++++++++ docs/{keyboard.md => target_keyboard.md} | 82 ++++++--- docs/target_mouse.md | 115 ++++++++++++ 19 files changed, 970 insertions(+), 252 deletions(-) create mode 100644 bindings/dbus-xml/org.shadowblip.Input.Gamepad.xml rename bindings/dbus-xml/{org.shadowblip.Input.Keyboard => org.shadowblip.Input.Keyboard.xml} (100%) create mode 100644 bindings/dbus-xml/org.shadowblip.Input.Mouse.xml rename docs/{target_dbus_device.md => target_dbus.md} (63%) create mode 100644 docs/target_gamepad.md rename docs/{keyboard.md => target_keyboard.md} (65%) create mode 100644 docs/target_mouse.md diff --git a/Cargo.lock b/Cargo.lock index 3d94e22..a5c7d5f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -708,7 +708,7 @@ dependencies = [ [[package]] name = "inputplumber" -version = "0.8.2" +version = "0.9.0" dependencies = [ "env_logger", "evdev", diff --git a/Makefile b/Makefile index 8afe9cc..70aa858 100644 --- a/Makefile +++ b/Makefile @@ -149,6 +149,25 @@ dist/$(NAME).raw: dist/$(NAME).tar.gz mv $(CACHE_DIR)/$(NAME).raw $@ cd dist && sha256sum $(NAME).raw > $(NAME).raw.sha256.txt +.PHONY: dbus-xml +dbus-xml: ## Generate DBus XML spec from running InputPlumber + busctl introspect org.shadowblip.InputPlumber \ + --xml-interface /org/shadowblip/InputPlumber/Manager > ./bindings/dbus-xml/org.shadowblip.Input.Manager.xml + busctl introspect org.shadowblip.InputPlumber \ + --xml-interface /org/shadowblip/InputPlumber/CompositeDevice0 > ./bindings/dbus-xml/org.shadowblip.Input.CompositeDevice.xml + busctl introspect org.shadowblip.InputPlumber \ + --xml-interface /org/shadowblip/InputPlumber/devices/target/dbus0 > ./bindings/dbus-xml/org.shadowblip.Input.DBusDevice.xml + busctl introspect org.shadowblip.InputPlumber \ + --xml-interface /org/shadowblip/InputPlumber/devices/target/keyboard0 > ./bindings/dbus-xml/org.shadowblip.Input.Keyboard.xml + busctl introspect org.shadowblip.InputPlumber \ + --xml-interface /org/shadowblip/InputPlumber/devices/target/mouse0 > ./bindings/dbus-xml/org.shadowblip.Input.Mouse.xml + busctl introspect org.shadowblip.InputPlumber \ + --xml-interface /org/shadowblip/InputPlumber/devices/target/gamepad0 > ./bindings/dbus-xml/org.shadowblip.Input.Gamepad.xml + busctl introspect org.shadowblip.InputPlumber \ + --xml-interface /org/shadowblip/InputPlumber/devices/source/event0 > ./bindings/dbus-xml/org.shadowblip.Input.Source.EventDevice.xml + busctl introspect org.shadowblip.InputPlumber \ + --xml-interface /org/shadowblip/InputPlumber/devices/source/hidraw0 > ./bindings/dbus-xml/org.shadowblip.Input.Source.HIDRawDevice.xml + XSL_TEMPLATE := ./docs/dbus2markdown.xsl .PHONY: docs docs: ## Generate markdown docs for DBus interfaces @@ -157,14 +176,18 @@ docs: ## Generate markdown docs for DBus interfaces sed -i 's/DBus Interface API/Manager DBus Interface API/g' ./docs/manager.md xsltproc --novalid -o docs/composite_device.md $(XSL_TEMPLATE) ./bindings/dbus-xml/org.shadowblip.Input.CompositeDevice.xml sed -i 's/DBus Interface API/CompositeDevice DBus Interface API/g' ./docs/composite_device.md + xsltproc --novalid -o docs/target_dbus.md $(XSL_TEMPLATE) ./bindings/dbus-xml/org.shadowblip.Input.DBusDevice.xml + sed -i 's/DBus Interface API/DBusDevice DBus Interface API/g' ./docs/target_dbus.md + xsltproc --novalid -o docs/target_keyboard.md $(XSL_TEMPLATE) ./bindings/dbus-xml/org.shadowblip.Input.Keyboard.xml + sed -i 's/DBus Interface API/Keyboard DBus Interface API/g' ./docs/target_keyboard.md + xsltproc --novalid -o docs/target_mouse.md $(XSL_TEMPLATE) ./bindings/dbus-xml/org.shadowblip.Input.Mouse.xml + sed -i 's/DBus Interface API/Mouse DBus Interface API/g' ./docs/target_mouse.md + xsltproc --novalid -o docs/target_gamepad.md $(XSL_TEMPLATE) ./bindings/dbus-xml/org.shadowblip.Input.Gamepad.xml + sed -i 's/DBus Interface API/Gamepad DBus Interface API/g' ./docs/target_gamepad.md xsltproc --novalid -o docs/source_event_device.md $(XSL_TEMPLATE) ./bindings/dbus-xml/org.shadowblip.Input.Source.EventDevice.xml sed -i 's/DBus Interface API/Source EventDevice DBus Interface API/g' ./docs/source_event_device.md xsltproc --novalid -o docs/source_hidraw_device.md $(XSL_TEMPLATE) ./bindings/dbus-xml/org.shadowblip.Input.Source.HIDRawDevice.xml sed -i 's/DBus Interface API/Source HIDRaw DBus Interface API/g' ./docs/source_hidraw_device.md - xsltproc --novalid -o docs/keyboard.md $(XSL_TEMPLATE) ./bindings/dbus-xml/org.shadowblip.Input.Keyboard - sed -i 's/DBus Interface API/Keyboard DBus Interface API/g' ./docs/keyboard.md - xsltproc --novalid -o docs/target_dbus_device.md $(XSL_TEMPLATE) ./bindings/dbus-xml/org.shadowblip.Input.DBusDevice.xml - sed -i 's/DBus Interface API/Target DBus Device Interface API/g' ./docs/target_dbus_device.md # Refer to .releaserc.yaml for release configuration .PHONY: sem-release diff --git a/README.md b/README.md index d6dcc8e..db0f8a9 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ and translate their input to a variety of virtual device formats. - [x] Combine multiple input devices - [x] Emulate mouse, keyboard, and gamepad inputs - [x] Intercept and route input over DBus for overlay interface control -- [ ] Input mapping profiles to translate source input into the desired target input +- [x] Input mapping profiles to translate source input into the desired target input - [ ] Route input over the network ## Install @@ -63,6 +63,177 @@ You can also interface with DBus using the `busctl` command: busctl tree org.shadowblip.InputPlumber ``` +### Input Profiles + +InputPlumber is capable of loading input device profiles to translate inputs into +any other supported input event. Input profiles are defined as YAML configuration +files that can be loaded on-demand for any device that InputPlumber manages. The +format of an input profile config is defined by the [Device Profile Schema](rootfs/usr/share/inputplumber/schema/device_profile_v1.json) to make it easier to create profiles. + +Typically input profiles should be generated using an external tool, but you +can manually create your own profiles using any text editor. If you use an editor +that supports the [YAML Language Server](https://github.com/redhat-developer/yaml-language-server) +you can write profiles with auto-complete and usage information. + +Here is a short example: + +```yaml +# yaml-language-server: $schema=https://raw.githubusercontent.com/ShadowBlip/InputPlumber/main/rootfs/usr/share/inputplumber/schema/device_profile_v1.json +version: 1 +kind: DeviceProfile +name: Start Button to Escape Key +description: Profile to map a gamepad's start button to the Escape keyboard key + +mapping: + - name: Menu + source_event: + gamepad: + button: Start + target_events: + - keyboard: KeyEsc +``` + +This example will remap the `Start` button from a gamepad to the `ESC` key. + +To load the input profile, you can use the `LoadProfilePath` method on the input +device you want the profile applied to. You can also do this from the command +line using `busctl`: + +```bash +busctl call org.shadowblip.InputPlumber \ + /org/shadowblip/InputPlumber/CompositeDevice0 \ + org.shadowblip.Input.CompositeDevice \ + LoadProfilePath "s" /usr/share/inputplumber/profiles/mouse_keyboard_wasd.yaml +``` + +### Intercept Mode + +Intercept Mode is a feature of InputPlumber that can allow external applications +to intercept input events from an input device and re-route them over DBus +instead. The primary use case for this feature is typically to allow overlay +applications (like [OpenGamepadUI](https://github.com/ShadowBlip/OpenGamepadUI)) +to stop input from reaching other running applications (like a game), +allowing the overlay to process inputs without those inputs leaking into other +running apps. + +You can set the intercept mode by setting the `InterceptMode` property on the +input device you want to intercept input from. The intercept mode can be one +of three values: + +- `0` (NONE) - No inputs are intercepted and re-routed +- `1` (PASS) - No inputs are intercepted and re-routed *except* for gamepad `Guide` events. Upon receiving a gamepad `Guide` event, the device is automatically switched to intercept mode `2` (ALL). +- `2` (ALL) - All inputs are intercepted and re-routed over DBus + +Typically the intercept mode should be handled by an external application, but +you can also set the intercept mode from the command line using `busctl`: + +```bash +busctl set-property org.shadowblip.InputPlumber \ + /org/shadowblip/InputPlumber/CompositeDevice0 \ + org.shadowblip.Input.CompositeDevice \ + InterceptMode u 2 +``` + +### Virtual Keyboard + +When InputPlumber is running, a virtual keyboard is created that is used for +sending keyboard inputs. You can also use this keyboard to send keyboard events +using the DBus interface with the `SendKey` method. You can do this from the +command line using `busctl`: + +```bash +busctl call org.shadowblip.InputPlumber \ + /org/shadowblip/InputPlumber/devices/target/keyboard0 \ + org.shadowblip.Input.Keyboard \ + SendKey sb KEY_ESC 1 +``` + +### Device Compositing & Capability Maps + +One feature of InputPlumber is the ability to combine multiple input devices +together into a single logical input device called a "Composite Device". This is +often required for many handheld gaming PCs that have built-in gamepads with +special non-standard buttons that show up as multiple independent input devices. + +Composite devices are defined as YAML configuration files that follow the +[Composite Device Schema](./rootfs/usr/share/inputplumber/schema/composite_device_v1.json) +to combine the defined input devices together. When InputPlumber starts up, it +looks at all the input devices on the system and checks to see if they match a +composite device configuration. If they do, the input devices are combined into +a single logical composite device. + +A composite device configuration looks like this: + +```yaml +# yaml-language-server: $schema=https://raw.githubusercontent.com/ShadowBlip/InputPlumber/main/rootfs/usr/share/inputplumber/schema/composite_device_v1.json +version: 1 +kind: CompositeDevice +name: OneXPlayer Intel + +# Only check for source devices if *any* of the given data matches. If this list is +# empty, then the source devices will *always* be checked. +matches: + - dmi_data: + product_name: ONEXPLAYER + sys_vendor: ONE-NETBOOK + cpu_vendor: GenuineIntel + - dmi_data: + product_name: ONE XPLAYER + sys_vendor: ONE-NETBOOK TECHNOLOGY CO., LTD. + cpu_vendor: GenuineIntel + +# One or more source devices to combine into a single virtual device. The events +# from these devices will be watched and translated according to the capability map. +source_devices: + - group: gamepad + evdev: + name: OneXPlayer Gamepad + phys_path: usb-0000:00:14.0-9/input0 + - group: keyboard + evdev: + name: AT Translated Set 2 keyboard + phys_path: isa0060/serio0/input0 + +# The target input device(s) that will be created for this composite device +target_devices: + - gamepad + - mouse + - keyboard + +# The ID of a device capability mapping in the 'capability_maps' folder +capability_map_id: oxp1 +``` + +In addition to combining multiple input devices together, composite devices can +also have a "Capability Map" to define the real capabilities of the input +device. This is commonly necessary for handheld gaming PCs where special +non-standard buttons will emit keyboard events (like `CTRL`+`ALT`+`DEL`) instead +of actual gamepad events. + +Capability maps are defined in a separate YAML configuration file that follows +the [Capability Map Schema](./rootfs/usr/share/inputplumber/schema/capability_map_v1.json) +and are referenced by their unique ID. + +A capability map configuration looks like this: + +```yaml +# yaml-language-server: $schema=https://raw.githubusercontent.com/ShadowBlip/InputPlumber/main/rootfs/usr/share/inputplumber/schema/capability_map_v1.json +version: 1 +kind: CapabilityMap +name: OneXPlayer Type 1 +id: oxp1 + +# List of mapped events that are activated by a specific set of activation keys. +mapping: + - name: Orange Button + source_events: + - keyboard: KeyLeftMeta + - keyboard: KeyD + target_event: + gamepad: + button: Guide +``` + ## License InputPlumber is licensed under THE GNU GPLv3+. See LICENSE for details. diff --git a/bindings/dbus-xml/org.shadowblip.Input.CompositeDevice.xml b/bindings/dbus-xml/org.shadowblip.Input.CompositeDevice.xml index 9d36bd0..0ca7590 100644 --- a/bindings/dbus-xml/org.shadowblip.Input.CompositeDevice.xml +++ b/bindings/dbus-xml/org.shadowblip.Input.CompositeDevice.xml @@ -3,6 +3,16 @@ "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"> + + + + + + @@ -15,6 +25,10 @@ Name of the composite device --> + + @@ -29,13 +43,6 @@ - - - - - - - @@ -60,5 +67,12 @@ + + + + + + + diff --git a/bindings/dbus-xml/org.shadowblip.Input.DBusDevice.xml b/bindings/dbus-xml/org.shadowblip.Input.DBusDevice.xml index 3a6bd5d..69bab42 100644 --- a/bindings/dbus-xml/org.shadowblip.Input.DBusDevice.xml +++ b/bindings/dbus-xml/org.shadowblip.Input.DBusDevice.xml @@ -2,13 +2,6 @@ - - - - - - - @@ -27,6 +20,13 @@ --> + + + + + + + diff --git a/bindings/dbus-xml/org.shadowblip.Input.Gamepad.xml b/bindings/dbus-xml/org.shadowblip.Input.Gamepad.xml new file mode 100644 index 0000000..6975bf4 --- /dev/null +++ b/bindings/dbus-xml/org.shadowblip.Input.Gamepad.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bindings/dbus-xml/org.shadowblip.Input.Keyboard b/bindings/dbus-xml/org.shadowblip.Input.Keyboard.xml similarity index 100% rename from bindings/dbus-xml/org.shadowblip.Input.Keyboard rename to bindings/dbus-xml/org.shadowblip.Input.Keyboard.xml index 0624990..2a9eacd 100644 --- a/bindings/dbus-xml/org.shadowblip.Input.Keyboard +++ b/bindings/dbus-xml/org.shadowblip.Input.Keyboard.xml @@ -2,6 +2,11 @@ + + + + + @@ -26,11 +31,6 @@ - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bindings/dbus-xml/org.shadowblip.Input.Source.EventDevice.xml b/bindings/dbus-xml/org.shadowblip.Input.Source.EventDevice.xml index 353d54c..1593d9f 100644 --- a/bindings/dbus-xml/org.shadowblip.Input.Source.EventDevice.xml +++ b/bindings/dbus-xml/org.shadowblip.Input.Source.EventDevice.xml @@ -2,29 +2,6 @@ - - - - - - - - - - - - - - - - - - - - - @@ -49,5 +26,28 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/bindings/dbus-xml/org.shadowblip.Input.Source.HIDRawDevice.xml b/bindings/dbus-xml/org.shadowblip.Input.Source.HIDRawDevice.xml index b1b78fa..830e844 100644 --- a/bindings/dbus-xml/org.shadowblip.Input.Source.HIDRawDevice.xml +++ b/bindings/dbus-xml/org.shadowblip.Input.Source.HIDRawDevice.xml @@ -2,6 +2,16 @@ + + + + + + + + + + @@ -31,16 +41,6 @@ - - - - - - - - - - diff --git a/docs/composite_device.md b/docs/composite_device.md index 6b2ab9d..d430e28 100644 --- a/docs/composite_device.md +++ b/docs/composite_device.md @@ -1,48 +1,52 @@ + # CompositeDevice DBus Interface API ## org.shadowblip.Input.CompositeDevice ### Properties + | Name | Access | Type | Description | | --- | :---: | :---: | --- | +| **Capabilities** | *read* | *as* | | | **DbusDevices** | *read* | *as* | | | **InterceptMode** | *readwrite* | *u* | | | **Name** | *read* | *s* | | +| **ProfileName** | *read* | *s* | | | **SourceDevicePaths** | *read* | *as* | | | **TargetDevices** | *read* | *as* | | ### Methods -### Signals - -## org.freedesktop.DBus.Introspectable +#### LoadProfilePath -### Methods -#### Introspect ##### Arguments | Name | Direction | Type | Description | | --- | :---: | :---: | --- | -| \*\*\*\* | *out* | *s* | | + | **path** | *in* | *s* | | + + ### Signals -## org.freedesktop.DBus.Peer +## org.freedesktop.DBus.Introspectable ### Methods -#### Ping +#### Introspect + -#### GetMachineId ##### Arguments | Name | Direction | Type | Description | | --- | :---: | :---: | --- | -| \*\*\*\* | *out* | *s* | | + | **** | *out* | *s* | | + + ### Signals @@ -52,41 +56,77 @@ #### Get + + ##### Arguments | Name | Direction | Type | Description | | --- | :---: | :---: | --- | -| **interface_name** | *in* | *s* | | -| **property_name** | *in* | *s* | | -| \*\*\*\* | *out* | *v* | | + | **interface\_name** | *in* | *s* | | + | **property\_name** | *in* | *s* | | + | **** | *out* | *v* | | + #### Set + + ##### Arguments | Name | Direction | Type | Description | | --- | :---: | :---: | --- | -| **interface_name** | *in* | *s* | | -| **property_name** | *in* | *s* | | -| **value** | *in* | *v* | | + | **interface\_name** | *in* | *s* | | + | **property\_name** | *in* | *s* | | + | **value** | *in* | *v* | | + #### GetAll + + ##### Arguments | Name | Direction | Type | Description | | --- | :---: | :---: | --- | -| **interface_name** | *in* | *s* | | -| \*\*\*\* | *out* | *a{sv}* | | + | **interface\_name** | *in* | *s* | | + | **** | *out* | *a{sv}* | | + + ### Signals #### PropertiesChanged + + +##### Arguments + +| Name | Direction | Type | Description | +| --- | :---: | :---: | --- | + | **interface\_name** | ** | *s* | | + | **changed\_properties** | ** | *a{sv}* | | + | **invalidated\_properties** | ** | *as* | | + + +## org.freedesktop.DBus.Peer + +### Methods + +#### Ping + + + + +#### GetMachineId + + + ##### Arguments | Name | Direction | Type | Description | | --- | :---: | :---: | --- | -| **interface_name** | \*\* | *s* | | -| **changed_properties** | \*\* | *a{sv}* | | -| **invalidated_properties** | \*\* | *as* | | + | **** | *out* | *s* | | + + + +### Signals diff --git a/docs/manager.md b/docs/manager.md index e34dec0..c9b0334 100644 --- a/docs/manager.md +++ b/docs/manager.md @@ -1,53 +1,47 @@ -# Manager DBus Interface API - -## org.freedesktop.DBus.Peer -### Methods +# Manager DBus Interface API -#### Ping +## org.shadowblip.InputManager -#### GetMachineId +### Properties -##### Arguments -| Name | Direction | Type | Description | +| Name | Access | Type | Description | | --- | :---: | :---: | --- | -| \*\*\*\* | *out* | *s* | | +| **InterceptMode** | *read* | *s* | | -### Signals +### Methods -## org.freedesktop.DBus.Introspectable +#### CreateCompositeDevice -### Methods -#### Introspect ##### Arguments | Name | Direction | Type | Description | | --- | :---: | :---: | --- | -| \*\*\*\* | *out* | *s* | | + | **config\_path** | *in* | *s* | | + | **** | *out* | *s* | | + + ### Signals -## org.shadowblip.InputManager +## org.freedesktop.DBus.Introspectable -### Properties +### Methods -| Name | Access | Type | Description | -| --- | :---: | :---: | --- | -| **InterceptMode** | *read* | *s* | | +#### Introspect -### Methods -#### CreateCompositeDevice ##### Arguments | Name | Direction | Type | Description | | --- | :---: | :---: | --- | -| **config_path** | *in* | *s* | | -| \*\*\*\* | *out* | *s* | | + | **** | *out* | *s* | | + + ### Signals @@ -57,41 +51,77 @@ #### Get + + ##### Arguments | Name | Direction | Type | Description | | --- | :---: | :---: | --- | -| **interface_name** | *in* | *s* | | -| **property_name** | *in* | *s* | | -| \*\*\*\* | *out* | *v* | | + | **interface\_name** | *in* | *s* | | + | **property\_name** | *in* | *s* | | + | **** | *out* | *v* | | + #### Set + + ##### Arguments | Name | Direction | Type | Description | | --- | :---: | :---: | --- | -| **interface_name** | *in* | *s* | | -| **property_name** | *in* | *s* | | -| **value** | *in* | *v* | | + | **interface\_name** | *in* | *s* | | + | **property\_name** | *in* | *s* | | + | **value** | *in* | *v* | | + #### GetAll + + ##### Arguments | Name | Direction | Type | Description | | --- | :---: | :---: | --- | -| **interface_name** | *in* | *s* | | -| \*\*\*\* | *out* | *a{sv}* | | + | **interface\_name** | *in* | *s* | | + | **** | *out* | *a{sv}* | | + + ### Signals #### PropertiesChanged + + +##### Arguments + +| Name | Direction | Type | Description | +| --- | :---: | :---: | --- | + | **interface\_name** | ** | *s* | | + | **changed\_properties** | ** | *a{sv}* | | + | **invalidated\_properties** | ** | *as* | | + + +## org.freedesktop.DBus.Peer + +### Methods + +#### Ping + + + + +#### GetMachineId + + + ##### Arguments | Name | Direction | Type | Description | | --- | :---: | :---: | --- | -| **interface_name** | \*\* | *s* | | -| **changed_properties** | \*\* | *a{sv}* | | -| **invalidated_properties** | \*\* | *as* | | + | **** | *out* | *s* | | + + + +### Signals diff --git a/docs/source_event_device.md b/docs/source_event_device.md index 550f9e4..aeccb91 100644 --- a/docs/source_event_device.md +++ b/docs/source_event_device.md @@ -1,93 +1,120 @@ + # Source EventDevice DBus Interface API -## org.freedesktop.DBus.Peer +## org.freedesktop.DBus.Properties ### Methods -#### Ping +#### Get + -#### GetMachineId ##### Arguments | Name | Direction | Type | Description | | --- | :---: | :---: | --- | -| \*\*\*\* | *out* | *s* | | + | **interface\_name** | *in* | *s* | | + | **property\_name** | *in* | *s* | | + | **** | *out* | *v* | | + -### Signals - -## org.freedesktop.DBus.Introspectable +#### Set -### Methods -#### Introspect ##### Arguments | Name | Direction | Type | Description | | --- | :---: | :---: | --- | -| \*\*\*\* | *out* | *s* | | + | **interface\_name** | *in* | *s* | | + | **property\_name** | *in* | *s* | | + | **value** | *in* | *v* | | + -### Signals +#### GetAll -## org.shadowblip.Input.Source.EventDevice -### Properties -| Name | Access | Type | Description | +##### Arguments + +| Name | Direction | Type | Description | | --- | :---: | :---: | --- | -| **DevicePath** | *read* | *s* | | -| **Handlers** | *read* | *as* | | -| **Name** | *read* | *s* | | -| **PhysPath** | *read* | *s* | | -| **SysfsPath** | *read* | *s* | | -| **UniqueId** | *read* | *s* | | + | **interface\_name** | *in* | *s* | | + | **** | *out* | *a{sv}* | | + -### Methods ### Signals -## org.freedesktop.DBus.Properties +#### PropertiesChanged -### Methods -#### Get ##### Arguments | Name | Direction | Type | Description | | --- | :---: | :---: | --- | -| **interface_name** | *in* | *s* | | -| **property_name** | *in* | *s* | | -| \*\*\*\* | *out* | *v* | | + | **interface\_name** | ** | *s* | | + | **changed\_properties** | ** | *a{sv}* | | + | **invalidated\_properties** | ** | *as* | | + + +## org.freedesktop.DBus.Peer + +### Methods + +#### Ping + + + + +#### GetMachineId + -#### Set ##### Arguments | Name | Direction | Type | Description | | --- | :---: | :---: | --- | -| **interface_name** | *in* | *s* | | -| **property_name** | *in* | *s* | | -| **value** | *in* | *v* | | + | **** | *out* | *s* | | + + + +### Signals + +## org.freedesktop.DBus.Introspectable + +### Methods + +#### Introspect + -#### GetAll ##### Arguments | Name | Direction | Type | Description | | --- | :---: | :---: | --- | -| **interface_name** | *in* | *s* | | -| \*\*\*\* | *out* | *a{sv}* | | + | **** | *out* | *s* | | + + ### Signals -#### PropertiesChanged +## org.shadowblip.Input.Source.EventDevice -##### Arguments +### Properties -| Name | Direction | Type | Description | + +| Name | Access | Type | Description | | --- | :---: | :---: | --- | -| **interface_name** | \*\* | *s* | | -| **changed_properties** | \*\* | *a{sv}* | | -| **invalidated_properties** | \*\* | *as* | | +| **DevicePath** | *read* | *s* | | +| **Handlers** | *read* | *as* | | +| **Name** | *read* | *s* | | +| **PhysPath** | *read* | *s* | | +| **SysfsPath** | *read* | *s* | | +| **UniqueId** | *read* | *s* | | + +### Methods + + +### Signals diff --git a/docs/source_hidraw_device.md b/docs/source_hidraw_device.md index dbf20f7..e1814fc 100644 --- a/docs/source_hidraw_device.md +++ b/docs/source_hidraw_device.md @@ -1,49 +1,84 @@ + # Source HIDRaw DBus Interface API +## org.shadowblip.Input.Source.HIDRawDevice + +### Properties + + +| Name | Access | Type | Description | +| --- | :---: | :---: | --- | +| **InterfaceNumber** | *read* | *i* | | +| **Manufacturer** | *read* | *s* | | +| **Path** | *read* | *s* | | +| **Product** | *read* | *s* | | +| **ProductId** | *read* | *s* | | +| **ReleaseNumber** | *read* | *s* | | +| **SerialNumber** | *read* | *s* | | +| **VendorId** | *read* | *s* | | + +### Methods + + +### Signals + ## org.freedesktop.DBus.Properties ### Methods #### Get + + ##### Arguments | Name | Direction | Type | Description | | --- | :---: | :---: | --- | -| **interface_name** | *in* | *s* | | -| **property_name** | *in* | *s* | | -| \*\*\*\* | *out* | *v* | | + | **interface\_name** | *in* | *s* | | + | **property\_name** | *in* | *s* | | + | **** | *out* | *v* | | + #### Set + + ##### Arguments | Name | Direction | Type | Description | | --- | :---: | :---: | --- | -| **interface_name** | *in* | *s* | | -| **property_name** | *in* | *s* | | -| **value** | *in* | *v* | | + | **interface\_name** | *in* | *s* | | + | **property\_name** | *in* | *s* | | + | **value** | *in* | *v* | | + #### GetAll + + ##### Arguments | Name | Direction | Type | Description | | --- | :---: | :---: | --- | -| **interface_name** | *in* | *s* | | -| \*\*\*\* | *out* | *a{sv}* | | + | **interface\_name** | *in* | *s* | | + | **** | *out* | *a{sv}* | | + + ### Signals #### PropertiesChanged + + ##### Arguments | Name | Direction | Type | Description | | --- | :---: | :---: | --- | -| **interface_name** | \*\* | *s* | | -| **changed_properties** | \*\* | *a{sv}* | | -| **invalidated_properties** | \*\* | *as* | | + | **interface\_name** | ** | *s* | | + | **changed\_properties** | ** | *a{sv}* | | + | **invalidated\_properties** | ** | *as* | | + ## org.freedesktop.DBus.Introspectable @@ -51,30 +86,15 @@ #### Introspect -##### Arguments - -| Name | Direction | Type | Description | -| --- | :---: | :---: | --- | -| \*\*\*\* | *out* | *s* | | - -### Signals -## org.shadowblip.Input.Source.HIDRawDevice -### Properties +##### Arguments -| Name | Access | Type | Description | +| Name | Direction | Type | Description | | --- | :---: | :---: | --- | -| **InterfaceNumber** | *read* | *i* | | -| **Manufacturer** | *read* | *s* | | -| **Path** | *read* | *s* | | -| **Product** | *read* | *s* | | -| **ProductId** | *read* | *s* | | -| **ReleaseNumber** | *read* | *s* | | -| **SerialNumber** | *read* | *s* | | -| **VendorId** | *read* | *s* | | + | **** | *out* | *s* | | + -### Methods ### Signals @@ -84,12 +104,19 @@ #### Ping + + + #### GetMachineId + + ##### Arguments | Name | Direction | Type | Description | | --- | :---: | :---: | --- | -| \*\*\*\* | *out* | *s* | | + | **** | *out* | *s* | | + + ### Signals diff --git a/docs/target_dbus_device.md b/docs/target_dbus.md similarity index 63% rename from docs/target_dbus_device.md rename to docs/target_dbus.md index c06cf3c..7e1e766 100644 --- a/docs/target_dbus_device.md +++ b/docs/target_dbus.md @@ -1,20 +1,5 @@ -# Target DBus Device Interface API -## org.freedesktop.DBus.Peer - -### Methods - -#### Ping - -#### GetMachineId - -##### Arguments - -| Name | Direction | Type | Description | -| --- | :---: | :---: | --- | -| \*\*\*\* | *out* | *s* | | - -### Signals +# DBusDevice DBus Interface API ## org.freedesktop.DBus.Introspectable @@ -22,11 +7,15 @@ #### Introspect + + ##### Arguments | Name | Direction | Type | Description | | --- | :---: | :---: | --- | -| \*\*\*\* | *out* | *s* | | + | **** | *out* | *s* | | + + ### Signals @@ -34,22 +23,50 @@ ### Properties + | Name | Access | Type | Description | | --- | :---: | :---: | --- | | **Name** | *read* | *s* | | ### Methods + ### Signals #### InputEvent + + ##### Arguments | Name | Direction | Type | Description | | --- | :---: | :---: | --- | -| **event** | \*\* | *s* | | -| **value** | \*\* | *d* | | + | **event** | ** | *s* | | + | **value** | ** | *d* | | + + +## org.freedesktop.DBus.Peer + +### Methods + +#### Ping + + + + +#### GetMachineId + + + +##### Arguments + +| Name | Direction | Type | Description | +| --- | :---: | :---: | --- | + | **** | *out* | *s* | | + + + +### Signals ## org.freedesktop.DBus.Properties @@ -57,41 +74,54 @@ #### Get + + ##### Arguments | Name | Direction | Type | Description | | --- | :---: | :---: | --- | -| **interface_name** | *in* | *s* | | -| **property_name** | *in* | *s* | | -| \*\*\*\* | *out* | *v* | | + | **interface\_name** | *in* | *s* | | + | **property\_name** | *in* | *s* | | + | **** | *out* | *v* | | + #### Set + + ##### Arguments | Name | Direction | Type | Description | | --- | :---: | :---: | --- | -| **interface_name** | *in* | *s* | | -| **property_name** | *in* | *s* | | -| **value** | *in* | *v* | | + | **interface\_name** | *in* | *s* | | + | **property\_name** | *in* | *s* | | + | **value** | *in* | *v* | | + #### GetAll + + ##### Arguments | Name | Direction | Type | Description | | --- | :---: | :---: | --- | -| **interface_name** | *in* | *s* | | -| \*\*\*\* | *out* | *a{sv}* | | + | **interface\_name** | *in* | *s* | | + | **** | *out* | *a{sv}* | | + + ### Signals #### PropertiesChanged + + ##### Arguments | Name | Direction | Type | Description | | --- | :---: | :---: | --- | -| **interface_name** | \*\* | *s* | | -| **changed_properties** | \*\* | *a{sv}* | | -| **invalidated_properties** | \*\* | *as* | | + | **interface\_name** | ** | *s* | | + | **changed\_properties** | ** | *a{sv}* | | + | **invalidated\_properties** | ** | *as* | | + diff --git a/docs/target_gamepad.md b/docs/target_gamepad.md new file mode 100644 index 0000000..6a7796f --- /dev/null +++ b/docs/target_gamepad.md @@ -0,0 +1,115 @@ + +# Gamepad DBus Interface API + +## org.freedesktop.DBus.Peer + +### Methods + +#### Ping + + + + +#### GetMachineId + + + +##### Arguments + +| Name | Direction | Type | Description | +| --- | :---: | :---: | --- | + | **** | *out* | *s* | | + + + +### Signals + +## org.freedesktop.DBus.Properties + +### Methods + +#### Get + + + +##### Arguments + +| Name | Direction | Type | Description | +| --- | :---: | :---: | --- | + | **interface\_name** | *in* | *s* | | + | **property\_name** | *in* | *s* | | + | **** | *out* | *v* | | + + +#### Set + + + +##### Arguments + +| Name | Direction | Type | Description | +| --- | :---: | :---: | --- | + | **interface\_name** | *in* | *s* | | + | **property\_name** | *in* | *s* | | + | **value** | *in* | *v* | | + + +#### GetAll + + + +##### Arguments + +| Name | Direction | Type | Description | +| --- | :---: | :---: | --- | + | **interface\_name** | *in* | *s* | | + | **** | *out* | *a{sv}* | | + + + +### Signals + +#### PropertiesChanged + + + +##### Arguments + +| Name | Direction | Type | Description | +| --- | :---: | :---: | --- | + | **interface\_name** | ** | *s* | | + | **changed\_properties** | ** | *a{sv}* | | + | **invalidated\_properties** | ** | *as* | | + + +## org.freedesktop.DBus.Introspectable + +### Methods + +#### Introspect + + + +##### Arguments + +| Name | Direction | Type | Description | +| --- | :---: | :---: | --- | + | **** | *out* | *s* | | + + + +### Signals + +## org.shadowblip.Input.Gamepad + +### Properties + + +| Name | Access | Type | Description | +| --- | :---: | :---: | --- | +| **Name** | *read* | *s* | | + +### Methods + + +### Signals diff --git a/docs/keyboard.md b/docs/target_keyboard.md similarity index 65% rename from docs/keyboard.md rename to docs/target_keyboard.md index 1fa8349..6798cfd 100644 --- a/docs/keyboard.md +++ b/docs/target_keyboard.md @@ -1,68 +1,87 @@ + # Keyboard DBus Interface API -## org.freedesktop.DBus.Properties +## org.freedesktop.DBus.Introspectable ### Methods -#### Get +#### Introspect + + ##### Arguments | Name | Direction | Type | Description | | --- | :---: | :---: | --- | -| **interface_name** | *in* | *s* | | -| **property_name** | *in* | *s* | | -| \*\*\*\* | *out* | *v* | | + | **** | *out* | *s* | | + + + +### Signals + +## org.freedesktop.DBus.Properties + +### Methods + +#### Get + -#### Set ##### Arguments | Name | Direction | Type | Description | | --- | :---: | :---: | --- | -| **interface_name** | *in* | *s* | | -| **property_name** | *in* | *s* | | -| **value** | *in* | *v* | | + | **interface\_name** | *in* | *s* | | + | **property\_name** | *in* | *s* | | + | **** | *out* | *v* | | + + +#### Set + -#### GetAll ##### Arguments | Name | Direction | Type | Description | | --- | :---: | :---: | --- | -| **interface_name** | *in* | *s* | | -| \*\*\*\* | *out* | *a{sv}* | | + | **interface\_name** | *in* | *s* | | + | **property\_name** | *in* | *s* | | + | **value** | *in* | *v* | | + + +#### GetAll -### Signals -#### PropertiesChanged ##### Arguments | Name | Direction | Type | Description | | --- | :---: | :---: | --- | -| **interface_name** | \*\* | *s* | | -| **changed_properties** | \*\* | *a{sv}* | | -| **invalidated_properties** | \*\* | *as* | | + | **interface\_name** | *in* | *s* | | + | **** | *out* | *a{sv}* | | + -## org.freedesktop.DBus.Introspectable -### Methods +### Signals + +#### PropertiesChanged + -#### Introspect ##### Arguments | Name | Direction | Type | Description | | --- | :---: | :---: | --- | -| \*\*\*\* | *out* | *s* | | - -### Signals + | **interface\_name** | ** | *s* | | + | **changed\_properties** | ** | *a{sv}* | | + | **invalidated\_properties** | ** | *as* | | + ## org.shadowblip.Input.Keyboard ### Properties + | Name | Access | Type | Description | | --- | :---: | :---: | --- | | **Name** | *read* | *s* | | @@ -71,12 +90,16 @@ #### SendKey + + ##### Arguments | Name | Direction | Type | Description | | --- | :---: | :---: | --- | -| **key** | *in* | *s* | | -| **value** | *in* | *b* | | + | **key** | *in* | *s* | | + | **value** | *in* | *b* | | + + ### Signals @@ -86,12 +109,19 @@ #### Ping + + + #### GetMachineId + + ##### Arguments | Name | Direction | Type | Description | | --- | :---: | :---: | --- | -| \*\*\*\* | *out* | *s* | | + | **** | *out* | *s* | | + + ### Signals diff --git a/docs/target_mouse.md b/docs/target_mouse.md new file mode 100644 index 0000000..5098c16 --- /dev/null +++ b/docs/target_mouse.md @@ -0,0 +1,115 @@ + +# Mouse DBus Interface API + +## org.freedesktop.DBus.Peer + +### Methods + +#### Ping + + + + +#### GetMachineId + + + +##### Arguments + +| Name | Direction | Type | Description | +| --- | :---: | :---: | --- | + | **** | *out* | *s* | | + + + +### Signals + +## org.shadowblip.Input.Mouse + +### Properties + + +| Name | Access | Type | Description | +| --- | :---: | :---: | --- | +| **Name** | *read* | *s* | | + +### Methods + + +### Signals + +## org.freedesktop.DBus.Introspectable + +### Methods + +#### Introspect + + + +##### Arguments + +| Name | Direction | Type | Description | +| --- | :---: | :---: | --- | + | **** | *out* | *s* | | + + + +### Signals + +## org.freedesktop.DBus.Properties + +### Methods + +#### Get + + + +##### Arguments + +| Name | Direction | Type | Description | +| --- | :---: | :---: | --- | + | **interface\_name** | *in* | *s* | | + | **property\_name** | *in* | *s* | | + | **** | *out* | *v* | | + + +#### Set + + + +##### Arguments + +| Name | Direction | Type | Description | +| --- | :---: | :---: | --- | + | **interface\_name** | *in* | *s* | | + | **property\_name** | *in* | *s* | | + | **value** | *in* | *v* | | + + +#### GetAll + + + +##### Arguments + +| Name | Direction | Type | Description | +| --- | :---: | :---: | --- | + | **interface\_name** | *in* | *s* | | + | **** | *out* | *a{sv}* | | + + + +### Signals + +#### PropertiesChanged + + + +##### Arguments + +| Name | Direction | Type | Description | +| --- | :---: | :---: | --- | + | **interface\_name** | ** | *s* | | + | **changed\_properties** | ** | *a{sv}* | | + | **invalidated\_properties** | ** | *as* | | +