sulaiman-alqusaimi / whatsapp_enhansements

an nvda addon developed to offer some accessibility enhansements for whatsapp uwp for windows 10 and 11
6 stars 5 forks source link

help to create shortcut on call window #6

Open MuhammadGagah opened 2 years ago

MuhammadGagah commented 2 years ago

hi. I try to create shortcut to end the call, but I failed. here is my code:

    @script(
        gesture="kb:alt+control+e",
        description=_("press end audio call, or end video call button"),
        category="whatsapp")
    def script_endCall(self, gesture):
        obj = self.find("EndCallButton")
        if obj:
            obj.doAction()
        else:
            gesture.send()

Maybe I should add something?

lbk2907 commented 2 years ago

I think this is the problem from the WhatsApp itself. Maybe it have a work around for it. I not really sure because of my python knowledge limitation.