Skip to content

Fluke/zotac zone dials #339

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 92 additions & 0 deletions rootfs/usr/share/inputplumber/capability_maps/zone_type1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/ShadowBlip/InputPlumber/main/rootfs/usr/share/inputplumber/schema/capability_map_v2.json
# Schema version number
version: 2

# The type of configuration schema
kind: CapabilityMap

# Name for the device event map
name: Zotac Zone Type 1

# Unique identifier of the capability mapping
id: zone1

# List of mapped events that are activated by a specific set of activation keys.
mapping:
- name: ZOTAC (shortpress)
source_events:
- evdev:
event_type: KEY
event_code: KEY_F16
value_type: button
target_event:
gamepad:
button: Guide
- name: MORE
source_events:
- evdev:
event_type: KEY
event_code: KEY_F17
value_type: button
target_event:
gamepad:
button: QuickAccess
- name: HOME (shortpress)
source_events:
- evdev:
event_type: KEY
event_code: KEY_F18
value_type: button
target_event:
gamepad:
button: QuickAccess2
- name: HOME (longpress)
source_events:
- evdev:
event_type: KEY
event_code: KEY_F19
value_type: button
target_event:
gamepad:
button: Keyboard
- name: Left Paddle
source_events:
- evdev:
event_type: KEY
event_code: KEY_HOME
value_type: button
target_event:
gamepad:
button: LeftPaddle1
- name: Right Paddle
source_events:
- evdev:
event_type: KEY
event_code: KEY_END
value_type: button
target_event:
gamepad:
button: RightPaddle1
- name: Left Dial
source_events:
- evdev:
event_type: REL
event_code: REL_HWHEEL
value_type: joystick_x
target_event:
gamepad:
dial:
name: LeftStickDial
- name: Right Dial
source_events:
- evdev:
event_code: REL_WHEEL
event_type: REL
value_type: joystick_x
target_event:
gamepad:
dial:
name: RightStickDial

# List of events to filter from the source devices
filtered_events: []
72 changes: 72 additions & 0 deletions rootfs/usr/share/inputplumber/devices/50-zotac-zone.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/ShadowBlip/InputPlumber/main/rootfs/usr/share/inputplumber/schema/composite_device_v1.json
# Schema version number
version: 1

# The type of configuration schema
kind: CompositeDevice

# Name of the composite device mapping
name: Zotac Zone

# Only allow a single source device per composite device of this type.
single_source: false

# Only use this profile if *any* of the given matches matches. If this list is
# empty, then the source devices will *always* be checked.
# /sys/class/dmi/id/product_name
matches:
- dmi_data:
board_name: G0A1W
sys_vendor: ZOTAC

# 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 key map.
source_devices:
- group: gamepad # Used for setting attributes on load
hidraw:
vendor_id: 0x1ee9
product_id: 0x1590
interface_num: 3
- group: gamepad
evdev:
name: ZOTAC Gaming Zone Gamepad
vendor_id: "1ee9"
product_id: "1590"
handler: event*
capability_map_id: zone1
- group: keyboard
evdev:
name: ZOTAC Gaming Zone Keyboard
vendor_id: "1ee9"
product_id: "1590"
handler: event*
capability_map_id: zone1
- group: mouse
evdev:
name: ZOTAC Gaming Zone Mouse
vendor_id: "1ee9"
product_id: "1590"
handler: event*
- group: mouse
evdev:
name: ZOTAC Gaming Zone Dials
vendor_id: "1ee9"
product_id: "1590"
handler: event*
capability_map_id: zone1
- group: imu
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) to emulate by default
target_devices:
- xbox-elite
- mouse
- keyboard
92 changes: 62 additions & 30 deletions rootfs/usr/share/inputplumber/profiles/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,33 +16,65 @@ name: Default

# Profile mappings
mapping:
- name: LeftTop
source_event:
gamepad:
button: LeftTop
target_events:
- gamepad:
button: LeftPaddle1
- name: RightTop
source_event:
gamepad:
button: RightTop
target_events:
- gamepad:
button: RightPaddle1
- name: Keyboard
source_event:
gamepad:
button: Keyboard
target_events:
- gamepad:
button: Guide
- gamepad:
button: North
- name: QuickAccess2
source_event:
gamepad:
button: QuickAccess2
target_events:
- gamepad:
button: Screenshot
- name: LeftTop
source_event:
gamepad:
button: LeftTop
target_events:
- gamepad:
button: LeftPaddle1
- name: RightTop
source_event:
gamepad:
button: RightTop
target_events:
- gamepad:
button: RightPaddle1
- name: Keyboard
source_event:
gamepad:
button: Keyboard
target_events:
- gamepad:
button: Guide
- gamepad:
button: North
- name: QuickAccess2
source_event:
gamepad:
button: QuickAccess2
target_events:
- gamepad:
button: Screenshot
- name: Left Dial Counter-clockwise
source_event:
gamepad:
dial:
name: LeftStickDial
direction: counter-clockwise
target_events:
- keyboard: KeyVolumeDown
- name: Left Dial Clockwise
source_event:
gamepad:
dial:
name: LeftStickDial
direction: clockwise
target_events:
- keyboard: KeyVolumeUp
- name: Right Dial Counter-clockwise
source_event:
gamepad:
dial:
name: RightStickDial
direction: counter-clockwise
target_events:
- keyboard: KeyBrightnessDown
- name: Right Dial Clockwise
source_event:
gamepad:
dial:
name: RightStickDial
direction: clockwise
target_events:
- keyboard: KeyBrightnessUp
Loading