def keyevent(self, keyname, **kwargs):
        """Perform keyevent on the device.

        Args:
            keyname: home/volumeUp/volumeDown
            **kwargs:
        """
        try:
            keyname = KEY_EVENTS[keyname.lower()]
        except KeyError:
            raise ValueError("Invalid name: %s, should be one of ('home', 'volumeUp', 'volumeDown')" % keyname)
        else:
            self.press(keyname)
Perform keyevent on the device.

        Args:
            keyname: home/volumeUp/volumeDown
            **kwargs:
        
airtest/core/ios/ios.py