How detect was clicked Win+Shift+S (made scren) JavaScript

How can I determine that the combination “Win +Shift+ S” was pressed?
I’m trying to do so, but the screenshot window comes out faster. Does anyone know how to fix this?

KeyCode for:
Win - 91
Shift - 16
S - 83

We can’t use shiftKey and metaKey because they only fire when we release them last

Here is my code:

<script>
    const set = new Set();

    window.addEventListener('keydown', event => {
        set.add(event.keyCode)
        console.log(set)
    });

    window.addEventListener('keyup', event => {
        if (set.has(91) && set.has(16) && set.has(83)) {
            alert('made screen')
        }
        set.delete(event.keyCode);
        console.log(set)
    });
</script>