Skip to content

In Game keyboards

Child of the Beast edited this page Nov 6, 2021 · 4 revisions

Desktop/VR

Overview

The In Game Keyboard is used to emulate MIDI input for both VR and Desktop users.

Controls

  • Left-Crtl - Open/Closes keyboard
  • Esc - Closes keyboard if open

Setup

Setup should be Super simple!

Drag and drop the prefab [placeholder]

Adding support to your own controller

Currently we only have support for UdonSharp. We are not guaranteeing this will work with regular Udon or any other Udon Compiler.

In Your Controller:

  • Create 2 new Methods, NoteOff() and NoteOn()
  • Copy everything in MidiNoteOff() and move it into NoteOff()
  • Copy everything in MidiNoteOn() and move it into NoteOn()
  • Make MidiNoteOff() and MidiNoteOn() look like this:
public override void MidiNoteOff(int _channel, int _note, int _velocity)
{
    NoteOff(1, _note, _velocity);
}
public override void MidiNoteOn(int _channel, int _note, int _velocity)
{
    NoteOn(1, _note, _velocity);
}

note we do not support Midi channels at this time

In MIDIPlayer.cs:

  • Import any namespaces that your controller uses
  • Change public MIDIcontroller MidiController; to public [Your Controller's Class name] MidiController;
    • the Class name is usually what you name the file and can be found at the top of your Script.
      • Example: public class MIDIPlayer : UdonSharpBehaviour MIDIPlayer is the Class name in this example

VR

Overview

Physical VR support is planned for the future but does not work at the moment.

How is this different from the desktop/vr keyboard? This is ment to be an actual object you play, and not a UI menu.

Clone this wiki locally