Turn off keyboard MIDI input for Keyboard Component
-
I'm sure there's an easy way to do this, but how do we avoid MIDI input coming from the computer keyboard keys for the interface Keyboard Component?
-
When keyboard (floatingTIle keyboard) lost focus , computer keyboard incoming messages don´t affect to it . So if you grabFocus in any another component floatingTIle keyboard don´t recevive the computer keyboard pulse.
use the grabFocus() function every time you need keyboard don,t receive computer keyboard key eventfunction onNoteOn()
{
anyComponent.grabFocus();
}function onNoteOff()
{
anyComponent.grabFocus();
}This make floatingTile keyboard only receives mouse pulsations !!!
-
Better option is add to interface a new empty label with textColour and bgColour properties set to a totally transparent colour and "editable" property set to "enabled" in order to receive focus without any perceptible change. In this way;
OnInit
{
const var Label1= Content.getComponent(("Label1");
//(change colours and editable properties in editor)
/./ any code...
}function onNoteOn()
{
Label1.grabFocus();
/./ any code...
{function onNoteOff()
{
Label1.grabFocus();
/./ any code...
{AnyWay , can you explain why do you need that ?
-
@jadg That's a bit hacky I'm afraid. We'll need a way to completely ignore incoming key strokes for that component without having to constantly change focus.
There are other serious implications with the method you suggest too. Imagine wanting to have focus on your preset browser so users can switch presets with their arrow keys, but every time they play a note it loses focus on the browser.
-
It,s really a bit hacky as you say...:beaming_face_with_smiling_eyes: