Tablet Buttons

The buttons of a tablet are handled by two different drivers and exposed by different event devices.

Power Button
Since the power button is relevant for power control, it is attached to the power management hardware. Install acpid for controlled shutdown using this button. Note the FEX power_start setting, which has an effect on reboot/halt, when connected to AC power.

Other Buttons
These are all other buttons like Vol+, Menu, etc.

Testing
For testing use the evtest utility.

Sunxi 3.4
For non-power buttons use the sun4i_keyboard module.

Mainline
Buttons are currently hot in the pipelines, but work well. See this thread for references to patches.

The non-power keys additionally need some special device tree entries. This is a funny device, an ADC actually, where each key is identified by a particular voltage, naturally the values are device depend.