Late, or early shortcut keys in an app?

Suppose I have an app that allows a user to use shortcut keys.

There are mouse move events that only get triggered on the key sequence ctrl+m.

The event object is passed to a timer delayed callback on each event.

Because of the delay the mouse is outside of the element, and the user has lifted their fingers off ctrl, and m, the callback still gets called.

Should the callback be allowed to execute late like that, or should it be restricted to run only when the mouse is inside the element, and/or while the user is holding down those keys?

Or is this really more of an implementation thing? There is a use case for late execution while dragging from app to app.

I know this kind of seems like an opinionated thing, but there are implications for UI interference, and/or user confusion.

This problem could also apply to touch interactions.

An example of what I mean:

function callback(){
    //This can be run outside of the element
    //And when fingers are off the keyboard
}
element.addEventListener('mousemove', event=>{
    if(event.ctrlKey && event.keyCode === 77){
        setTimeout(callback, 1000);
    }
})

The event.keyCode doesn't have to be m. It can be some other key. Here m is used for example. The general problem is late execution on the callback when the user may, or may not be using their hands for the input at the time of execution.