Skip to content

Commit

Permalink
feat(CapabilityMap): add capability mapping and translation support
Browse files Browse the repository at this point in the history
  • Loading branch information
ShadowApex committed Mar 7, 2024
1 parent 50bb67d commit 7fb58e3
Show file tree
Hide file tree
Showing 21 changed files with 1,303 additions and 275 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# yaml-language-server: $schema=../schema/capability_map_v1.json
# Schema version number
version: 1

Expand All @@ -13,12 +14,49 @@ id: oxp3
# List of mapped events that are activated by a specific set of activation keys.
mapping:
- name: Turbo
from: keyboard
source_capabilities:
- Keyboard:Key:LeftCtrl
- Keyboard:Key:LeftAlt
- Keyboard:Key:LeftMeta
target_capability: Gamepad:Button:Base
source_events:
- keyboard: KeyLeftCtrl
- keyboard: KeyLeftAlt
- keyboard: KeyLeftMeta
target_event:
gamepad:
button: QuickAccess
- name: KB (Short Press)
source_events:
- keyboard: KeyRightCtrl
- keyboard: KeyLeftMeta
- keyboard: KeyO
target_event:
gamepad:
button: Keyboard
- name: Orange Button (Short Press)
source_events:
- keyboard: KeyLeftMeta
- keyboard: KeyD
target_event:
gamepad:
button: Guide
- name: Orange Button (Long Press)
source_events:
- keyboard: KeyLeftMeta
- keyboard: KeyG
target_event:
gamepad:
button: QuickAccess2
- name: Turbo + Orange Button
source_events:
- keyboard: KeyLeftMeta
- keyboard: KeySysrq
target_event:
gamepad:
button: Screenshot
- name: KB + Orange Button
source_events:
- keyboard: KeyRightCtrl
- keyboard: KeyRightAlt
- keyboard: KeyDelete
target_event:
keyboard: KeyF13

# List of events to filter from the source devices
filtered_events: []
3 changes: 0 additions & 3 deletions rootfs/usr/share/inputplumber/devices/gamepads.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,3 @@ target_devices:
- gamepad
- mouse
- keyboard

# The ID of a device event mapping in the 'event_maps' folder
event_map_id: xb360
4 changes: 2 additions & 2 deletions rootfs/usr/share/inputplumber/devices/onexplayer_amd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@ target_devices:
- mouse
- keyboard

# The ID of a device event mapping in the 'event_maps' folder
event_map_id: oxp2
# The ID of a device event mapping in the 'capability_maps' folder
capability_map_id: oxp2
4 changes: 2 additions & 2 deletions rootfs/usr/share/inputplumber/devices/onexplayer_intel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ target_devices:
- mouse
- keyboard

# The ID of a device event mapping in the 'event_maps' folder
event_map_id: oxp1
# The ID of a device event mapping in the 'capability_maps' folder
capability_map_id: oxp1
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ target_devices:
- mouse
- keyboard

# The ID of a device event mapping in the 'event_maps' folder
event_map_id: oxp3
# The ID of a device event mapping in the 'capability_maps' folder
capability_map_id: oxp3
3 changes: 0 additions & 3 deletions rootfs/usr/share/inputplumber/devices/steam_deck.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,3 @@ target_devices:
- gamepad
- mouse
- keyboard

# The ID of a device event mapping in the 'event_maps' folder
event_map_id: deck
3 changes: 0 additions & 3 deletions rootfs/usr/share/inputplumber/devices/xbox360.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,3 @@ target_devices:
- gamepad
- mouse
- keyboard

# The ID of a device event mapping in the 'event_maps' folder
event_map_id: xb360
45 changes: 0 additions & 45 deletions rootfs/usr/share/inputplumber/event_maps/onexplayer_type3.yaml

This file was deleted.

Loading

0 comments on commit 7fb58e3

Please sign in to comment.