Skip to content

Commit

Permalink
fix(Device): Add OrangePi NEO Initial Support
Browse files Browse the repository at this point in the history
  • Loading branch information
pastaq authored and ShadowApex committed Apr 2, 2024
1 parent 620ec53 commit d41efb1
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 0 deletions.
5 changes: 5 additions & 0 deletions rootfs/usr/lib/udev/hwdb.d/59-inputplumber.hwdb
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,8 @@ evdev:name:AT Translated Set 2 keyboard:dmi:*:svnAYANEO:*
KEYBOARD_KEY_68=f17
KEYBOARD_KEY_69=f18

# OrangePi Devices
evdev:name:AT Translated Set 2 keyboard:dmi:*:svnOrangePi:pnNEO-01:*
KEYBOARD_KEY_66=f15
KEYBOARD_KEY_67=f16

42 changes: 42 additions & 0 deletions rootfs/usr/share/inputplumber/capability_maps/orangepi_type1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# yaml-language-server: $schema=../schema/capability_map_v1.json
# Schema version number
version: 1

# The type of configuration schema
kind: CapabilityMap

# Name for the device event map
name: OrangePi Type 1

# Unique identifier of the capability mapping
id: opi1

# List of mapped events that are activated by a specific set of activation keys.
mapping:
- name: Guide
source_events:
- keyboard: KeyF16
target_event:
gamepad:
button: Guide
- name: QuickAccess
source_events:
- keyboard: KeyF15
target_event:
gamepad:
button: QuickAccess
- name: LC
source_events:
- keyboard: KeyF17
target_event:
gamepad:
button: LeftTop
- name: RC
source_events:
- keyboard: KeyF18
target_event:
gamepad:
button: RightTop

# List of events to filter from the source devices
filtered_events: []
42 changes: 42 additions & 0 deletions rootfs/usr/share/inputplumber/devices/50-orangepi_neo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# yaml-language-server: $schema=../schema/composite_device_v1.json
# Schema version number
version: 1

# The type of configuration schema
kind: CompositeDevice

# Name of the composite device mapping
name: OrangePi NEO

# 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:
product_name: NEO-01
sys_vendor: OrangePi

# 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
evdev:
name: Microsoft X-Box 360 pad
phys_path: usb-0000:c3:00.3-5/input0
- group: keyboard
evdev:
name: AT Translated Set 2 keyboard
phys_path: isa0060/serio0/input0
- group: keyboard
evdev:
name: " OrangePi USB Controller"
phys_path: usb-0000:c3:00.3-5/input1

# The target input device(s) that the virtual device profile can use
target_devices:
- gamepad
- mouse
- keyboard

# The ID of a device event mapping in the 'event_maps' folder
capability_map_id: opi1

0 comments on commit d41efb1

Please sign in to comment.