FrontEndler User

Hi, I have a problem and need help.

I would like to extend my script, I am in programming a complete loser.
Sure, the one or other thing I have managed, but with my project I just fail and therefore ask here for help.
It's about a script addon for Chrome called Tampermonkey.
Someone wrote me a desired script, which I could then extend with a little luck, simply because I still knew a little with variables.
But that was it and now I do not know what to do.

I would like:
That the script, after a successful reload of a web page, executes a keybind.

As an example:
Means, the script runs, waits.... Event starts, script executes the reload (page reloads once), waits a few seconds and then automatically presses e.g. CTRL + END.
The reason why I want this: Chrome allows key combinations that trigger extensions. And that's exactly what I want to achieve with it.
Or would it be possible that it then runs an autohotkey script? Because that triggers it too.

Script Without attempt:

// ==/UserScript==
(function() {
    'use strict';
    document.title = "ReloadxRecord"
    const timeToWait = 15; // in seconds
    //waits a few seconds before checking if someone is live
    setTimeout(() => {
        // only check if channel isn't already live when the script started (main use for reloading the page if live)
        if (document.querySelector('.twilight-main .live-indicator-container') === null) {
            checkIfLive();
        }
        else {
            const current = new Date();
            const time = current.toLocaleTimeString("de-DE");
            console.log("                                                                          %c�� Reload was successful  ⌛⌛ " + time + " ⌛⌛  channel is live ��","background:green;color:#fff;font-size: x-large");
        }
    }, timeToWait * 1000);

    function checkIfLive() {
        if (document.querySelector('.twilight-main .live-indicator-container') !== null) {
            //reload page because channel is live:
            location.reload();
        }
        const current = new Date();
        const time = current.toLocaleTimeString("de-DE");
        console.log("                                                                         %c�� Channel is not live  ⌛⌛ " + time + " ⌛⌛  checking again... ��","background:red;color:#fff;font-size: x-large");
        setTimeout(() => checkIfLive(), timeToWait * 1000);
    }

})();

Tried it this way, which just doesn't work :S :

// ==/UserScript==
(function() {
    'use strict';
    document.title = "ReloadxRecord"
    const timeToWait = 15; // in seconds
    //waits a few seconds before checking if someone is live
    setTimeout(() => {
        // only check if channel isn't already live when the script started (main use for reloading the page if live)
        if (document.querySelector('.twilight-main .live-indicator-container') === null) {
            checkIfLive();
        }
        else {
            const current = new Date();
            const time = current.toLocaleTimeString("de-DE");
            console.log("                                                                          %c�� Reload was successful  ⌛⌛ " + time + " ⌛⌛  channel is live ��","background:green;color:#fff;font-size: x-large");
        }
    }, timeToWait * 1000);

    function checkIfLive() {
        if (document.querySelector('.twilight-main .live-indicator-container') !== null) {
            //reload page because channel is live:
            location.reload();
        }
        const current = new Date();
        const time = current.toLocaleTimeString("de-DE");
        console.log("                                                                         %c�� Channel is not live  ⌛⌛ " + time + " ⌛⌛  checking again... ��","background:red;color:#fff;font-size: x-large");
        document.onkeyup = function(e) {
            if (e.ctrlKey && e.which == 35) {
            }
        }
        setTimeout(() => checkIfLive(), timeToWait * 1000);
    }

})();

I hope someone can give me the right solution, because as I said, I tried it, but with zero programming skills will probably nothing. Especially since I have to work and already 4-5 days at it try :S .

Thank you very much

Greetings