Triggering workflows on keyPress

Hey, so I’m doing something like this on page load.

//0198ddb2-5fcd-4aca-93de-00a6788ca1d0 <-- workflowID

let doc = document || wwLib.getFrontDocument

doc.onkeypress = function (e) {
    e = e || window.event;
    if (e.keyCode === 100) {
        console.log("->")
        wwLib.executeWorkflow("0198ddb2-5fcd-4aca-93de-00a6788ca1d0", { "start_date": variables[/* Date range picker - value */ '441dd885-d1a5-4354-a14d-0c2c7749bca4-value']?.['start'], "end_date": variables[/* Date range picker - value */ '441dd885-d1a5-4354-a14d-0c2c7749bca4-value']?.['end'], "amount": -1, "subtract": false })
    }

    if (e.keyCode === 97) {
        console.log("<-")
        wwLib.executeWorkflow("0198ddb2-5fcd-4aca-93de-00a6788ca1d0", { "start_date": variables[/* Date range picker - value */ '441dd885-d1a5-4354-a14d-0c2c7749bca4-value']?.['start'], "end_date": variables[/* Date range picker - value */ '441dd885-d1a5-4354-a14d-0c2c7749bca4-value']?.['end'], "amount": -1, "subtract": false })
    };
    }

I even tried placing an element with the workflow ID on the page, as mentioned in various guides, but I still get the workflow not found error for some reason.

I had a typo. Lol.

Should be replace by,

let doc = wwLib.getFrontDocument()