Computer keyboard input

  • Can we detect any QUERTY keyboard button presses in HISE? I'm thinking mainly of modifier keys like CTRL, SHIFT, and ALT.

  • You mean in combination with mouse clicks?

    The thing is that modifiers alone don't trigger any callback in JUCE, so you need either another keypress or a mouse event.

    What do you want to achieve?

  • Yes it would be with a mouse click. So when a control is clicked you could check to see if a key is also held. I use this kind of thing for example if I want a single button to have more than one purpose. Or a recent project I worked on a user could enable multiple articulations by selecting more than one button, they hold CTRL down if they want to select more than one otherwise it just selects one.

  • This is a reasonable request. You'll need to roll your own widget from a Panel then, because the other widgets have already some hardcoded modifiers (eg. dragging sliders with Ctrl enables fine tune mode)

  • I think I'm getting the hang of the panel now so that shouldn't be an issue

  • Alright, I added the modifier keys:


    BTW, if you call setValue() with a Panel, the controlCallback isn't executed automatically (to prevent recursive loops). You need to call Panel.changed() to execute the control callback.

  • That was quick! just trying out the new build now.

Log in to reply