forked from chrippa/ds4drv
-
Notifications
You must be signed in to change notification settings - Fork 20
/
ds4drv.conf
174 lines (145 loc) · 4.53 KB
/
ds4drv.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
# Many of the settings used here are directly connected to their command line
# counterparts, see "ds4drv --help" for more information about available options.
##
# Global options
##
[ds4drv]
# Run ds4drv in background as a daemon
#daemon = true
# Location of the log file in daemon mode
#daemon-log = ~/.cache/ds4drv.log
# Location of the PID file in daemon mode
#daemon-pid = /tmp/ds4drv.pid
# Enable hidraw mode
#hidraw = true
##
# Controller settings
#
# This is the default profile for each controller.
# Multiple controllers slots are defined by increasing the number.
#
# Controller sections contain:
# Key: A option, these are the same options that can used on the command line
# but without the "--" prefix.
# Value: The option's value, should be "true" if no value is needed.
#
# See "ds4drv --help" for a complete list of available options.
##
[controller:1]
# Enables LED flash on low battery
#battery-flash = true
# Sets LED color
#led = 0000ff
# Enables profile switching
#profile-toggle = PS
# Profiles to cycle through
#profiles = xpad,kbmouse
##
# Profiles
#
# Profiles allows switching controller settings during runtime.
#
# Profile sections always require a name and are then enabled on a controller
# with "profiles = <profile1>[,<profile2>]".
#
# The same settings available for controllers are used here.
##
[profile:xpad]
led = ff0000
# Emulate the same button mapping as wired Xbox 360 controllers
emulate-xpad = true
[profile:kbmouse]
led = 00ff00
# Enable trackpad mouse
trackpad-mouse = true
# Custom button mapping
mapping = keyboard
# Custom action bindings
bindings = exec_stuff
##
# Mappings
#
# Mappings let you map buttons and sticks to mouse, key and joystick events.
#
# Mapping sections always require a name and are then enabled in a profile
# with "mapping = <name>".
#
# Mapping sections contain:
# Key: A Linux input event, see /usr/include/linux/input-event-codes.h for a complete list
# Value: Button on the DS4, use --dump-reports to see all the available buttons
##
[mapping:keyboard]
# General button to key mapping
KEY_UP = dpad_up
KEY_LEFT = dpad_left
KEY_DOWN = dpad_down
KEY_RIGHT = dpad_right
KEY_Z = button_cross
KEY_X = button_circle
# Turn analog stick directions into buttons
KEY_W = -left_analog_y
KEY_A = -left_analog_x
KEY_S = +left_analog_y
KEY_D = +left_analog_x
# Map relative mouse movement to a analog stick
REL_X = right_analog_x
REL_Y = right_analog_y
# Map mouse buttons
BTN_LEFT = button_r2
BTN_RIGHT = button_l2
# Emulate mouse wheel on r1 and l1
REL_WHEELUP = button_l1
REL_WHEELDOWN = button_r1
# Mouse settings
#mouse_sensitivity = 0.6
#mouse_deadzone = 5
# Scroll wheel emulation settings (values are in seconds)
#mouse_scroll_repeat_delay = 0.25 # How long to wait before continual scrolling
#mouse_scroll_delay = 0.05 # Lower this to scroll faster; raise to scroll slower
##
# Bindings
#
# Bindings let you bind button combos to special built-in actions.
#
# Binding sections can be defined with a name and are then enabled in a profile
# with "bindings = <name>".
#
# It's also possible to define a global bindings section that is enabled
# on all profiles.
#
# Sections contains:
# Key: A button combo
# Value: An action, see next section for valid actions.
#
#
# Valid actions:
# next-profile Loads the next profile
# prev-profile Loads the previous profile
# load-profile <profile> Loads the specified profile
# exec <command> [arg1] [arg2] ... Executes the command with
# specified arguments
# exec-background <command> [arg1] [arg2] ... Same as exec but launches in
# the background
#
#
# Actions will be pre-processed and replace variables with real values.
#
# Valid variables:
# $profile The current profile
# $name Pretty name of the current device
# $device_addr Bluetooth address of the device
# $report.<attribute> Replace <attribute> with a valid attribute,
# use --dump-reports to see which are available
##
[bindings]
# Cycle profiles
#PS+Right = next-profile
#PS+Left = prev-profile
# Go directly to specified profile
#PS+Up = load-profile kbmouse
#PS+Down = load-profile default
[bindings:exec_stuff]
# Execute a command in the foreground, blocking until it has finished
PS+Cross = exec echo '$name'
# Execute a command in the background
PS+Triangle = exec-background sh -c 'echo "disconnect $device_addr" | bluetoothctl'