Skip to content
Vehicle properties
Displays & HMI

HW_KEY_INPUT

What it is

Property to feed H/W input events to android

int32Values[0] : action defined by VehicleHwKeyInputAction int32Values[1] : key code, must use standard android key code int32Values[2] : target display defined in VehicleDisplay. Events not tied to specific display must be sent to VehicleDisplay#MAIN. int32Values[3] : [optional] Number of ticks. The value must be equal or greater than 1. When omitted, Android will default to 1.

How the ID is built

A property ID is a 32-bit value packing four fields. Reading 0x11410a10 apart:

FieldMaskValueMeans
Group0xf00000000x10000000SYSTEM
Area0x0f0000000x01000000GLOBAL
Type0x00ff00000x00410000INT32_VEC
Ordinal0x0000ffff0x00000a100xa10

Reading it from an app

CarPropertyManager mgr = (CarPropertyManager)
        car.getCarManager(Car.PROPERTY_SERVICE);

CarPropertyValue<Integer> value =
        mgr.getProperty(VehiclePropertyIds.HW_KEY_INPUT, 0);

This property is read-only — writes are rejected. It fires a callback whenever the value changes.