Is there something like ScriptUI's "keyboardState" in UXP?

In my old Extendscript/CEP Panels I always used “keyboardState” to add a secondary behavior to my buttons. For example, when a modifier key like shift is pressed while clicking on the button a different function is called:

} else {

Does anybody know if there is something similar in UXP? Thanks!

Check Adobe’s Kitchen-sink plugin - it has an example (Alt and Shift are detected, but Ctrl isn’t for some reason)

1 Like

Thanks for pointing that out. Unfortunately I have no Idea how I can implement that in a similar way as I did with CEP. Any chance you can point me in the right direction?

Oh and by the way, ctrl and meta (command on mac) are also detected on my machine (PS 23.0.0) …?!