Some devices have a pressure-sensitive virtual home button, that is considered a pressure sensor, not a button. As far as I know these Samsung Galaxy devices are affected: S8, S8+, S9, S9+, Note10, Note10+ and Fold.
Since it is a sensor, it should be listed by SensorManager
:
for (Sensor s : ((SensorManager) getSystemService(SENSOR_SERVICE)).getSensorList(Sensor.TYPE_ALL))
Log.d("Sensor", s.getName());
But it wasn't when I was testing on such a device. How else could it be accessed? I don't know enough about HAL (Hardware Abstraction Layer). I don't know if drivers of the Linux kernel can be used directly. Or is there an undocumented way to access the pressure-sensitive virtual home button?