Replies: 9 comments
-
Hey! It's not the first time I was asked to have a way to programmatically control the editor, maybe instead of emulating keypresses, you could just add characters and move the cursor of each editor via JavaScript. The problem I see is that if these keyboards are connected directly to the same computer, they will all send the same keystrokes and there would be no way to distinguish each other. Or are they connected to some kind of hardware or something? Is this for some kind of installation? |
Beta Was this translation helpful? Give feedback.
-
Thank you for the response! Sorry, I should have been more detailed: Yes, the (old PS/2) keyboards are connected to Arduino-based controllers (one controller per keyboard) that are then connected to the Computer via MIDI. I can distinguish the keyboards in the little MIDI-based protocol I wrote.
I could supply commands like ```Insert Character A for User 02``` or ```Move Cursor left for User 04```. I probably would have a program in between to translate these messages. Do you think that there could be an easy solution to make flok react to those messages?
The aim is to have a one-computer-multi-user-livecoding scenario, more or less :)
|
Beta Was this translation helpful? Give feedback.
-
Ahhh interesting! That makes sense :) Yes, I think it should be possible. I can think of an API to control Flok from a parent window via Window messaging. In the pre-1.0 version I had something like this for evaluating messages. This way, you could embed Flok in an IFrame, and control everything through WebMIDI/WebSockets, and your multikeyboard controller... |
Beta Was this translation helpful? Give feedback.
-
That sounds very interesting, thank you! As far as I understand, I wouldn't have to make any changes to flok, but only write a system with the IFrames and the Message relaying, right? Is there any way to join a session under a specific nickname? |
Beta Was this translation helpful? Give feedback.
-
Exactly, you can just iframe https://next.flok.cc with some query parameters |
Beta Was this translation helpful? Give feedback.
-
Great, thank you! When I use the link you provided, the dialog for configuring targets + username still comes up. Is there anyway to get around this? |
Beta Was this translation helpful? Give feedback.
-
I haven't deployed those query parameters yet (still working on that! #200 and #191), but don't worry, I'll soon merge that and document properly. I'll update you here. |
Beta Was this translation helpful? Give feedback.
-
Thank you very much, this sounds great! :-)
… Am 08.01.2024 um 16:54 schrieb Damián Silvani ***@***.***>:
I haven't deployed those query parameters yet (still working on that! #200 <#200>), but don't worry, I'll soon merge that and document properly. I'll update you here.
—
Reply to this email directly, view it on GitHub <#201 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AP7YKHWJMRWEKVMO3TGEMWLYNQJDFAVCNFSM6AAAAABBRGB3GOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBRGMZTENBUGQ>.
You are receiving this because you authored the thread.
|
Beta Was this translation helpful? Give feedback.
-
Hey there,
I've got a question that might be out of scope for a github issue - if so, please feel free to close/delete it!
Would it be possible to emulate keypresses (insert, delete, move cursors) via the Javascript console from a single client?
My use case would be the following: I have a system with multiple keyboards (for multiple users) connected and would like to use emulate a flok session with multiple users, but only on one computer.
Could you maybe point me in a direction? Help would be greatly appreciated!
All best,
moritz
Beta Was this translation helpful? Give feedback.
All reactions