This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Josh Ackerman
Posted Feb 09 - Read on Facebook

Hello, I am working on a virtual keyboard prototype between an iPad and iMac using firebase (for more information see https://goo.gl/jxSjYP). So far it seems like all the major functions are working, however it would be cool to make something closer to a working demo with trackpad support and arrow keys.

I have some ideas about how to make this work, but before I dive in to coding something that is possibly more complicated than it needs to be, I would love to hear your ideas, or general feedback. My idea for the arrow keys sound simple enough, but maybe my implementation of the track pad could be better?

For the trackpad, I was thinking of having a layer on the main computer with its position mapped to the location of touchDrag events within the trackpad on my tablet. Then on a tap event, I could record the coordinates of the tap, adjust coordinates, and then simulate a click at that location on the main computer.

For the arrow keys, I found an example of specifying the location of the cursor within a text box so pressing an arrow key would find the current position of the cursor in the text box, and then increment or decrement by one depending on which arrow key was pressed.

4 Comments

Krijn Rijshouwer

Josh Ackerman did you ever finish this prototype? Would love to take a look!

Brian Bailey

This sounds like an amazing body of work. If you're using an input device recognized as a keyboard, have you looked at using the KeyboardEvent API for arrow keys?: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent

Jordan Robert Dobson

You can also record gestures from the trackpad I believe.

Sigurd Tapio Mannsåker

Just out of curiosity, what's the latency like between the two devices via Firebase? Is there much lag between tapping a key and seeing it on he TV? Was gonna do something kinda related, and was looking at using socket.io but could consider Firebase if you've had success with it

Read the entire post on Facebook