def handle_os_download_confirmation()

in modules/page_base.py [0:0]


    def handle_os_download_confirmation(self, keyboard: Controller, sys_platform: str):
        """
        This function handles the keyboard shortcuts. If on Linux, it simulates switching
        to OK. On other platforms, it directly presses enter.
        """
        if sys_platform == "Linux":
            # Perform the series of ALT+TAB key presses on Linux
            keyboard.press(Key.alt)
            keyboard.press(Key.tab)
            keyboard.release(Key.tab)
            keyboard.release(Key.alt)
            time.sleep(1)
            keyboard.press(Key.alt)
            keyboard.press(Key.tab)
            keyboard.release(Key.tab)
            keyboard.release(Key.alt)
            time.sleep(1)
            keyboard.press(Key.tab)
            keyboard.release(Key.tab)
            time.sleep(1)
            keyboard.press(Key.tab)
            keyboard.release(Key.tab)

        # Press enter to confirm the download on all platforms
        keyboard.press(Key.enter)
        keyboard.release(Key.enter)