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
|
dome-key(1)
===========
NAME
----
dome-key - Custom mappings for headphone buttons
SYNOPSIS
--------
*dome-key* ['options']
DESCRIPTION
-----------
Enables customisation of headphone buttons. The *dome-key* program runs
in the background listening to button events, executing user-defined
actions in response to these events.
Headphone button mappings are defined in a file called
'~/.config/dome-key/mappings.dkmap'. See 'MAPPINGS' or
dome-key-mappings(7) for more information.
OPTIONS
-------
--audio::
Play interface audio. Sounds will play to provide feedback when a mode
is activated or deactivated.
-d, --daemon::
Run the daemon in the current shell to listen for headphone button
events. The program will run in the foreground.
-h, --help::
Print usage help.
--license 'file'::
Register the software using the license plist file at path 'file'.
-r, --reload-mappings::
Reload the mappings file. If an instance of *dome-key* is running, no
updates to the mappings file are taken into account automatically.
Executing the program with this flag will cause the running daemon to
reload the mappings file into its memory. This is typically easier
than killing and relaunching the daemon.
-v, --version::
Print the program version.
CONFIGURATION
-------------
An optional configuration file can be added at
'~/.config/dome-key/config.toml'.
Presently, only one configuration option is available. Here’s an example
config:
timeout = 400
timeout::
Sets the speed of multi-button mappings. To run an action mapped to
'<Play><Down>', you first press the ‘play’ button, then the ‘down’
button on your headphones. The time allowed between each button press
is defined by this option. By default, it’s set to 500 milliseconds.
It can be changed to any positive integer amount of milliseconds.
Setting it to '0' will prevent multi-button mappings and cause button
actions to be executed immediately.
MAPPINGS
--------
Mappings are defined in '~/.config/dome-key/mappings.dkmap'. See
dome-key-mappings(7) for a complete explanation of the syntax.
If a button is not mapped, it retains its normal function. The following
mappings apply when undefined, even without a mappings file:
map <Up> <VolumeUp>
map <Play> <Play>
map <Down> <VolumeDown>
LAUNCHD
-------
It’s recommended that you run the program in the background using
launchd(8). Here’s an example plist:
${PLIST}
You can also use *brew services* to do this automatically if the program
was installed with Homebrew.
FILES
-----
*~/.config/dome-key/config.toml*::
Configuration file.
*~/.config/dome-key/mappings.dkmap*::
Button mapping definitions.
SEE ALSO
--------
dome-key-mappings(7).
COPYRIGHT
---------
${LICENSE}
Aquatic Prime
~~~~~~~~~~~~~
Copyright (C) 2005-2010 Lucas Newman and other contributors. All rights
reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
- Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
- Neither the name of the Aquatic nor the names of its contributors may be
used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|