Node.js press Media_Play_Pause Key

So I`m finally trying to learn some javascript.
As a little exercise, I started to write a vs code extension.

I need to virtually press the media_play_pause key.
In Python I can just write:

import win32api
win32api.keybd_event(0xb3, 34)

I tried multiple different things but nothing worked so far.
The closest I got was:

var ks = require("node-key-sender");
ks.sendKey("@179");

But it just won`t work.