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.

  • Hi guys,

    I'm trying to make it work but it still doens't work using a panel.

    Here's a snippet:

    HiseSnippet 1160.3oc6X01aaaCDlxNpHwadqsXec.Z9St.YFxourh8BVRrSJ71RhQcV6FJFLXjnrHLEo.EsyLBx+s8SZ+C1Np2csZlqAZwBPDPrEOd2wmi73ycwCkBGRTjPhL147EgDjwmZNZAW42yGS4nA8QFeo4d16Ya209oiUjH03ojEiCDtTOJQFgNbQHNJh3hLLp+BsIF6rEJ94u+wCwLL2gTHBgdkf5P9EZ.UUHc39+LkwNF6RNmFTR6mr+.GAumfIlAvqtoMJD6LEOgbJVqVMSjw8NxkpDxQJL.MjwVGJbWLxWbIOQ+WQinWvH5AcQi.GkH9XAyUiXsTTOeJycX11PDB7xvhMk5IaJeg4ITWZt7hMm6GOgUgEk2OLpcSvqaY3Yu9vynD71JAdOvbjijFpJlQisOwb.WQjdX3HnLrRzEU6MaY1S.ZvUcBvSIGKgA4Vzt6d16ZAe7nuqYiFywRqKotSHJqevJyHrq6PLmvZ2RmWD+Zqcs.q.aZXAOMxzLhngVHQpnjHXcB9oQmc5xlcEXQKXIT9s9VqmYuqdnOgNwWULNBOmLfOTR.+AR6FKDyXhK6AedAjbDAhac.iYUHnw0YnII.53hU3NgkhCGIANeFhU9seKU03FNoUuTLSQ4j1dy3NJpf2dxiZbUrlJeZTpG63vHXYlKhci9iIZujjD2N4qnNRh6pp4AWBdIwQ09M5Md3OHpsdr8e.Zd8p35DwrHRVTV.LxbHhx.G0KYLfLpyTXMikdUy7UF1AhDLRmPIDjsacNbdzRedW87I9hFMxm5o5CYwkUM+k7EsrhkVyJV2Uz+qVBEW2rJme.68w0oZuNNtWf66giS0dMbrpmRxVeOmqdkt9ZcNgkU14tkfepPQNi2Ve1uSiqarxTddUNm9RfTvXDYkSqYjk2jgs4yBtfH20ZNlMijqHPMsL2Wi2M2WYpYmj6jkTTvGvopyBI4iShzLI1n7.rrnh3prz3voB0JDsJgKJkmPS8lpNnpJl3sYFwqlECQc0jt4rZn3sjxU+P+5f9.WQlm.mVPKBx5SlCUGSnz2wrOIZpRDFqaPnfqgfw1qy59mHCSC8xsH6kXhUvo266SARB0ZYIkIW0xMRkuL+Jx3yMWheEJeuR4HnnnvcFCqVtRot8fzIfTnkJIoK6vinpEkae3CR4y0EtOvbHU43WMdqUAdgC0Oz3MsYjllG44AEJJ.6VlG+aeD57nVIrrcd2hzfPF4EYPoYp.qXIu6tC+8+pOggWZ+60oIoYZreE8ONfOGttLTvvx2d2u9xgb80iv4+n+uaNEQGRV2ZRoenY7V9sI.GmRb6Av22DHf+e.bS5WcxIXkjpKFb5rfQPimND.pbnBQjttPMcosjw1Y0IFQ3twC9G3Icxt5wFoS1MaRzZvE7Yk4B16FHCPn6HCtiL3NxfasjAeLVi.riTL1IoCb8Uysik.wMO92CZGySzis5l02soocGaT.0kN1wQ2jzWC6OUaydafMOdCr4IafMOcCr4YafMeyFXyyuQaz+zXGLSIBRx+AACOJ9++wv3HNFxjiuJf9WvY7+4C

    I get this :

    Interface:! API call with undefined parameter 0 {SW50ZXJmYWNlfHw1NTR8Mjh8MjI=}
    :			function() - Line 28, column 22	{SW50ZXJmYWNlfHw1NTR8Mjh8MjI=}

    Any ideas?
    Thanks again for the help!

  • e999e32a-ba3d-4ff7-92a6-4081a0d3fa82-image.png

  • @d-healey

    Thanks a lot, It works!

Log in to reply