Once https://code.launchpad.net/~rsalveti/qtmir/wired_hs_keys/+merge/243720 is merged you'll be able to retrieve such events at the Qt level (in our case I think the shell is the one responsible for handling the input stack and taking actions).
On QML you should look for both Qt.Key_MediaPlay and Qt.Key_MediaTogglePlayPause (a similar logic would need to be in place for multimedia playback, and also checking if there is an income call in place, but not yet done).
Once https:/ /code.launchpad .net/~rsalveti/ qtmir/wired_ hs_keys/ +merge/ 243720 is merged you'll be able to retrieve such events at the Qt level (in our case I think the shell is the one responsible for handling the input stack and taking actions).
On QML you should look for both Qt.Key_MediaPlay and Qt.Key_ MediaTogglePlay Pause (a similar logic would need to be in place for multimedia playback, and also checking if there is an income call in place, but not yet done).