Button Manager Config Format
INI-style config at /data/misc/ax86_btn_manager.conf. This file is the source of truth. Keylayout (.kl) overlays under /data/system/devices/keylayout/ are generated from it and are not meant to be edited by hand.
Top level
version=1
Button sections
One [button.<id>] section per mapping.
Action-specific fields
device_control params
Percent values are 0-100.
Global section
[global]
intercept_mode=consume
reload_on_boot=true
Android keycodes and .kl overlays
For hardware function keys (P1/P2/P3), use KEYCODE_BUTTON_1 through KEYCODE_BUTTON_16. Those produce valid .kl labels (BUTTON_1, and so on). KEYCODE_F1 through F12 also work. Names like PROG1 are not valid .kl labels.
Example
[button.P4]
label=Brightness
device_match=*
scan_code=0x193
action=device_control
control=brightness_toggle
low=0
high=100
Apply / reload
adb push ax86_btn_manager.conf /data/misc/
adb shell cmd ax86_btnmgr reload
Or:
adb shell setprop persist.ax86.btnmgr.reload 1