def simulate_keypress(self, modifiers: list[str], key: str) -> None:
        """Simulates a keypress on the focused window.

        This triggers internal bindings only; for full simulation see external tools
        such as xdotool or ydotool.

        Parameters
        ==========
        modifiers :
            A list of modifier specification strings. Modifiers can be one of
            "shift", "lock", "control" and "mod1" - "mod5".
        key :
            Key specification.

        Examples
        ========
            simulate_keypress(["control", "mod2"], "k")
        """
        try:
            self.core.simulate_keypress(modifiers, key)
        except utils.QtileError as e:
            raise CommandError(str(e))
Simulates a keypress on the focused window.

        This triggers internal bindings only; for full simulation see external tools
        such as xdotool or ydotool.

        Parameters
        ==========
        modifiers :
            A list of modifier specification strings. Modifiers can be one of
            "shift", "lock", "control" and "mod1" - "mod5".
        key :
            Key specification.

        Examples
        ========
            simulate_keypress(["control", "mod2"], "k")
        
libqtile/core/manager.py