Capturing button presses from bluetooth hands free kits on a Raspberry Pi

Is there anything better than this wonky and unreliable hack for capturing keypresses from a handsfree kit?

sudo hciconfig hci0 down
sudo hciconfig hci0 up
sudo hcidump -l 1 | grep ACL

As the kit connects, I see in syslog

Sep 27 21:17:10 gvoice bluetoothd[532]: Unable to get connect data for Hands-Free Voice gateway: getpeername: Transport endpoint is not connected (107)

Sep 27 21:17:10 gvoice bluetoothd[532]: Unable to get connect data for Headset Voice gateway: getpeername: Transport endpoint is not connected (107)

I can see it appearing as

Sep 27 21:14:29 gvoice kernel: [  827.342038] input: B8:D5:0B:4C:CF:59 as /devices/virtual/input/input6

evtest gives

sudo evtest
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0: B8:D5:0B:4C:CF:59
Select the device event number [0-0]: 0
[...]
    Event code 402 (KEY_CHANNELUP)
    Event code 403 (KEY_CHANNELDOWN)
    Event code 405 (KEY_LAST)
  Event type 2 (EV_REL)
Key repeat handling:
  Repeat type 20 (EV_REP)
    Repeat code 0 (REP_DELAY)
      Value    300
    Repeat code 1 (REP_PERIOD)
      Value     33
Properties:
Testing ... (interrupt to exit)

but there are never any events.

(I’m asking as I have it nicely hooked up to google voice recogniser via aiy. But it needs (and I want) a button press to trigger it. With a bit of twiddling hands free kits and bluetooth headsets work nicely with Raspian Stretch.)