Table of Contents
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.
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
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>
It’s recommended that you run the program in the background using launchd(8). Here’s an example plist:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>com.teddywing.dome-key</string> <key>ProgramArguments</key> <array> <string>/usr/local/bin/dome-key</string> <string>--daemon</string> <string>--audio</string> </array> <key>RunAtLoad</key> <true/> <key>KeepAlive</key> <true/> <key>StandardErrorPath</key> <string>/tmp/dome-key.log</string> </dict> </plist>
You can also use brew services to do this automatically if the program was installed with Homebrew.
Copyright (c) 2018 Teddy Wing
Purchasing policy notice: All users of the software are expected to purchase a license from Teddy Wing unless they have a good reason not to pay. Users who can’t purchase a license may apply to receive one for free at inquiry@domekey.teddywing.com. Users are free to:
This software is available under a modified version of the Open Community Indie Software License:
Permission to use, copy, modify, and/or distribute this software for any purpose is hereby granted, subject to the following conditions:
THE SOFTWARE IS PROVIDED "AS IS", AND THE AUTHOR AND COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, WITH REGARD TO THIS SOFTWARE, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL THE AUTHOR OR COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA, OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Copyright © 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:
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.