Simple event tunnel for sending keyboard and mouse events from one browser to another
MIT License
by @michalbe
Gimmevents is a simple event tunnel that sends keyboard and mouse events from one browser to another. CLients needs to register with a unique key.
I don't have any VR controller what makes my a-frame based games boring and non-interactive. With Gimmevents I can render game on my VR set (for now it's just my phone) and still control it with my computer's keyboard or mouse.
Gimmevents uses WebSockets and custom pairing system to send events from one browser to another.
const gimmevents = new Gimmevents.Emitter({
key: my_unique_session_key,
host: host
});
gimmevents.register(event);
const gimmevents = new Gimmevents.Receiver({
key: my_unique_session_key,
host: host
});
gimmevents.on(event, (e) => {
// Do stuff
});
git clone [email protected]:michalbe/gimmevents.git
cd gimmevents
npm i
npm run dev
then open localhost:7100/emitter.html in one browser and localhost:7100/receiver.html in another. Demo listened to all the keys pressed in one window and sends them to another.