-
Notifications
You must be signed in to change notification settings - Fork 65
feat(Hardware Support): Razer Tartarus Pro #518
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
Open
dripsnek
wants to merge
1
commit into
ShadowBlip:main
Choose a base branch
from
dripsnek:razer_tartarus_pro
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
rootfs/usr/share/inputplumber/devices/50-razer_tartarus_pro.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| # 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: Razer Tartarus Pro | ||
|
|
||
| # 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: [] | ||
|
|
||
| # Maximum number of source devices per CompositeDevice. | ||
| maximum_sources: 7 | ||
|
|
||
| # 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: keyboard | ||
| blocked: true | ||
| unique: false | ||
| evdev: | ||
| name: "Razer Razer Tartarus Pro*" | ||
| handler: event* | ||
| - group: keyboard | ||
| unique: false | ||
| hidraw: | ||
| vendor_id: 0x1532 | ||
| product_id: 0x244 | ||
| interface_num: 0 | ||
| - group: keyboard | ||
| unique: false | ||
| hidraw: | ||
| vendor_id: 0x1532 | ||
| product_id: 0x244 | ||
| interface_num: 1 | ||
| config: | ||
| analogkeys: | ||
| primary_actuation: | ||
| # 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 | ||
| keys: [2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0] | ||
| secondary_actuation: | ||
| keys: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] | ||
| retrigger_reset_threshold: | ||
| keys: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] | ||
| retrigger_trigger_threshold: | ||
| keys: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] | ||
| continuous_retrigger: | ||
| keys: ["N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N"] | ||
| - group: mouse | ||
| unique: false | ||
| passthrough: true | ||
| hidraw: | ||
| vendor_id: 0x1532 | ||
| product_id: 0x244 | ||
| interface_num: 2 | ||
|
|
||
| # The target input device(s) to emulate by default | ||
| target_devices: | ||
| - mouse | ||
| - keyboard | ||
|
|
||
| options: | ||
| auto_manage: true | ||
135 changes: 135 additions & 0 deletions
135
rootfs/usr/share/inputplumber/profiles/secondary_rebind.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,135 @@ | ||
| # yaml-language-server: $schema=https://raw.githubusercontent.com/ShadowBlip/InputPlumber/main/rootfs/usr/share/inputplumber/schema/device_profile_v1.json | ||
| # Schema version number | ||
| version: 1 | ||
|
|
||
| # The type of configuration schema | ||
| kind: DeviceProfile | ||
|
|
||
| # Name of the device profile | ||
| name: Tartarus Pro Secondary Actuation Rebind | ||
|
|
||
| # Description of the device profile | ||
| description: Rebinding profile for the Tartarus Pro which generates phantom keypresses during second actuation | ||
|
|
||
| # Profile mappings | ||
| mapping: | ||
| # Phantom keys generated by secondary actuation | ||
| - name: Phantom-1 | ||
| source_event: | ||
| keyboard: KeyB | ||
| target_events: | ||
| - keyboard: KeyB | ||
|
|
||
| - name: Phantom-2 | ||
| source_event: | ||
| keyboard: KeyG | ||
| target_events: | ||
| - keyboard: KeyG | ||
|
|
||
| - name: Phantom-3 | ||
| source_event: | ||
| keyboard: KeyH | ||
| target_events: | ||
| - keyboard: KeyH | ||
|
|
||
| - name: Phantom-4 | ||
| source_event: | ||
| keyboard: KeyI | ||
| target_events: | ||
| - keyboard: KeyI | ||
|
|
||
| - name: Phantom-5 | ||
| source_event: | ||
| keyboard: KeyJ | ||
| target_events: | ||
| - keyboard: KeyJ | ||
|
|
||
| - name: Phantom-6 | ||
| source_event: | ||
| keyboard: KeyK | ||
| target_events: | ||
| - keyboard: KeyK | ||
|
|
||
| - name: Phantom-7 | ||
| source_event: | ||
| keyboard: KeyL | ||
| target_events: | ||
| - keyboard: KeyL | ||
|
|
||
| - name: Phantom-8 | ||
| source_event: | ||
| keyboard: KeyM | ||
| target_events: | ||
| - keyboard: KeyM | ||
|
|
||
| - name: Phantom-9 | ||
| source_event: | ||
| keyboard: KeyN | ||
| target_events: | ||
| - keyboard: KeyN | ||
|
|
||
| - name: Phantom-10 | ||
| source_event: | ||
| keyboard: KeyO | ||
| target_events: | ||
| - keyboard: KeyO | ||
|
|
||
| - name: Phantom-11 | ||
| source_event: | ||
| keyboard: KeyP | ||
| target_events: | ||
| - keyboard: KeyP | ||
|
|
||
| - name: Phantom-12 | ||
| source_event: | ||
| keyboard: KeyT | ||
| target_events: | ||
| - keyboard: KeyT | ||
|
|
||
| - name: Phantom-13 | ||
| source_event: | ||
| keyboard: KeyU | ||
| target_events: | ||
| - keyboard: KeyU | ||
|
|
||
| - name: Phantom-14 | ||
| source_event: | ||
| keyboard: KeyV | ||
| target_events: | ||
| - keyboard: KeyV | ||
|
|
||
| - name: Phantom-15 | ||
| source_event: | ||
| keyboard: KeyY | ||
| target_events: | ||
| - keyboard: KeyY | ||
|
|
||
| - name: Phantom-16 | ||
| source_event: | ||
| keyboard: Key6 | ||
| target_events: | ||
| - keyboard: Key6 | ||
|
|
||
| - name: Phantom-17 | ||
| source_event: | ||
| keyboard: Key7 | ||
| target_events: | ||
| - keyboard: Key7 | ||
|
|
||
| - name: Phantom-18 | ||
| source_event: | ||
| keyboard: Key8 | ||
| target_events: | ||
| - keyboard: Key8 | ||
|
|
||
| - name: Phantom-19 | ||
| source_event: | ||
| keyboard: Key9 | ||
| target_events: | ||
| - keyboard: Key9 | ||
|
|
||
| - name: Phantom-20 | ||
| source_event: | ||
| keyboard: Key0 | ||
| target_events: | ||
| - keyboard: Key0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a huge fan of this array to be honest. I think it is going to be too difficult to manually edit for anyone who didn't write the code. IMU configs are already difficult enough and that's just 9 values and they are shared among many devices.
Perhaps you could have default values that are overridden by a config.
Then add these fields as optional field, each as an indexed named entry that matches the capabilities for each key & activation level.
Maybe there is a better way than that as well. I'd like to get @ShadowApex opinion on it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm open to options, this first iteration seemed the most straight forward to me at the time as I couldn't find a way to get a profile setting to work its way through to a backing source device, it all seemed to terminate at the composite device. I'll revisit this later on in the week.