Is there an app/script that translates monome button presses to typing keyboard presses? Not a musical keyboard. I want to map keyboard shortcuts (or just individual keys) to buttons on my non-varibright 64. Larger models of monome grids could map out the entire keyboard.
I don’t know if there’s anything current, but I did this for Mac way back in the MonomeSerial days.
It’s relatively straight-forward to write a Mac app to emulate system keyboard events, but bridging that to OSC (or using libmonome directly?), I’m not entirely sure about
I remember this video. I knew I had seen a proof of concept for this at some point. Found the original thread for this app on the old forum, no active links tho. Typosaurus didn’t make it to the collected-ms Github. Also, I’m on Windows now. My macbook died last week.
I’d like to have the monome’s buttons freely Mappable to any (and multiple) keyboard key(s). This would make the monome a great game controller for a large variety of games, and would be a great tool to pair with a DAW or other softwares that have a lot of shortcuts.
So what would be the next step in making something like this that works with with the latest serialOSC? Could I accomplish this in pure data? I know pure data accepts the keyboard as an input, but can it output keyboard presses as well?
I don’t know if there’s a cross-platform API that would support this, so if there were a PD external that could output keystrokes, it would likely have specific implementation for each of mac/windows/linux.
If I remember correctly, in Typosaurus, we used the CGEvent api (
CGEventCreateKeyboardEvent, I think?). I’m completely unfamiliar with Windows APIs, so I don’t know what the equivalent might be.
At the time, Typosaurus was rolled into a custom build of MonomeSerial, as a special mode, since MonomeSerial already had the scaffolding to interface directly with the FTDI serial driver. Doing this via SerialOSC would mean that you need to build a standalone app that speaks Bonjour/OSC in order to connect to SerialOSC, and then performs the mapping you suggested, to whatever system API is available for generating virtual keystrokes.
edit - it looks like keybd_event does what you want on Windows, but I have no idea if Win32 is still a good API to use
This is a huge help @rknLA thank you for the wisdom. This sort of coding is certainly beyond me. I have a close friend who is about a year into a computer engineering degree and has minor experience with C++. Hopefully he can help me out with some of the C++ leg work. Or perhaps a good Samaritan of lines also wants to be able to use the monome for keyboard shortcuts/as a computer game controller.
So, to make sure i have this straight, I would need to write something in C++ that speaks either bonjour or OSC in order to act as a bridge between serialosc and this API function thingy SendInput. The C++ code will need to handle the functionality of mapping the the monome buttons to defined keystrokes and LED feedback.
i’d recommend libmonome instead OSC since as noted, this will have to be a c/c# jam anyways. you can eliminate some moving parts by talking to the serial device directly and not involving any network stuff.
on windows ,
SendKeys (or yeah, SendInput) for the keystroke emulation and some nasty win32 calls to find the process which owns the window you’re interested in sending keys to. (full doc here). autohotkey is an open-source project that one could build from.
Woof… I’m in over my head. Just keep swimming. I need to do some reading to better understand libmonome. Thank you @zebra
This lays out a gamecube controller on your keyboard for use with the dolphin emulator using AHK. This is for a more specific use than what I’ve been talking about but if I can make my monome talk to AHK, then I should be able to just save AHK scripts for different applications. So AHK is C#? And I can use libmonome to interface with serialosc through c#? Edit: no, but i can use AHK.dll with C#. I clearly have no idea what I’m talking about. le sigh
Sorry, if I don’t understand fully.
Being a karabiner fan I was going to suggest this! about a month too late!
Today I thought I should look into getting older apps running on my new windows and I came across this. In theory we could run this and b0xx-ahk together and hopefully we get the functionality we want. Essentially a variant of what @rknLA suggested
I think Letters does a sort of inverse of what you’re after: when you press a keyboard key, it changes the lights on a grid. When you press a key on the grid, it only updates the lights, it doesn’t emit a keystroke to the OS
Expletive… I would have discovered this myself last night had I not ran into issues with serialosc on my windows 10 machine. Well, thank you for the heads up. Good thing I downloaded Chuck