Connect a Keyboard for play Roblox Keyboard

Hello. I recently did a game with Pianos and I want to know how can I connect my MIDI Keyboard to Roblox for play Roblox Piano via my IRL Keyboard.
Thanks for take time to respond and read: Official_DevFrancais

2 Likes

I do not think that is possible to do

2 Likes

Well, to me, this sounds like its impossible to do via solely Roblox. However, depending on how your keyboard works, you may be able to put something together with AutoHotkey, or, AutoIt (which actually uses lua!).

Your best bet is trying to locate how your MIDI keyboard sends keys to your computer. If the connection is over USB, perhaps look at what driver it uses as a starting point, and research how that driver works.

At its most complicated (sort of), you may end up needing to write some C++/C code to interpret your MIDI keyboard’s key presses. This sounds perfectly feasible, since a program needs to be able to access this, there probably exists a library or API to do this already. Then, you just need to somehow press the keys you want, which, also is should be (relatively) simple, especially with AutoHotkey being open source.

4 Likes

To simplify what @Hexcede is saying, and to provide an extra functionality for those without a MIDI keyboard:

You need to map MIDI keys to regular letters on the PC keyboard via a program on your PC, so Roblox just sees regular computer keys.


One way to do this, that several music composing programs use, is to map the white keys to (ASDFGHJKL) and use parts of the top line (QWERTYUIOP) for the black keys where they sit between the keys below.

That makes it simpler than picking random keys, and it also helps your players who don’t have midi keyboards as they can play in a relatively intuitive way.

3 Likes