- Adapt bitmask to the new events api on leap.common. Related to #6359.