|
|
PedalBear is configured via a simple flat configuration file using the infamous DOS-like syntax.
|
|
|
|
|
|
Each section is between two brackets and each configuration option is in the key=value syntax. No quotes are needed around a value. Case is sensitive for section names as well as key names.
|
|
|
|
|
|
# Sections
|
|
|
|
|
|
## Pedalbear
|
|
|
|
|
|
Main section, contains the following keys.
|
|
|
|
|
|
**Device** : path to the device used as HID input. Must be readable by pedalbear.
|
|
|
|
|
|
## Up/Down sections
|
|
|
|
|
|
PedalBear supports a variety of sections to handle button events:
|
|
|
|
|
|
* LeftDown
|
|
|
* CenterDown
|
|
|
* RightDown
|
|
|
* LeftUp
|
|
|
* CenterUp
|
|
|
* RightUp
|
|
|
|
|
|
Coming versions of PedalBear will handle combos, like LeftCenterDown.
|
|
|
|
|
|
Each up/down section may contain keywords indicating what to do when related event is triggered:
|
|
|
|
|
|
**Exec** : command to execute with /bin/sh (may contain arguments)
|
|
|
|
|
|
**Key** : key to send to the X server. PedalBear _must_ be able to send X keys, like having access to the display. See <X11/keysymdef.h> for complete reference. May contain modifiers (shift, meta, control and the like) separated by the "+" key.
|
|
|
|
|
|
**File** : complete path to a file to append a message into.
|
|
|
|
|
|
**Message** : message to append to a file, if _File_ is specified. May contain carriage returns in the form of "\n"
|
|
|
|
|
|
**Create** : if set to non zero, create the file specified by _File_. Otherwise, PedalBear would fail.
|
|
|
|
|
|
|
|
|
# Example configuration
|
|
|
|
|
|
Example configuration file:
|
|
|
|
|
|
`[Pedalbear]`
|
|
|
|
|
|
`Device=/dev/infinity-in-usb-2`
|
|
|
|
|
|
`[LeftDown]`
|
|
|
|
|
|
`Exec = killall ogg123`
|
|
|
|
|
|
`[CenterDown]`
|
|
|
|
|
|
`File = /tmp/foo`
|
|
|
|
|
|
`Message = Down\n`
|
|
|
|
|
|
`Create = 1`
|
|
|
|
|
|
`[RightDown]`
|
|
|
|
|
|
|
|
|
`Key = Shift+Page_Down` |