Linking keypress in page to a python callback

Hey!

I would like to toggle a panel Toggle widget when I press some keyboard key in the browser tab. Is this possible?

Thanks!

maybe you can define a callback with the keyboard module

Thanks, but that seems unrelated. I need a hook that links the keyboard press in the dashboard tab in the browser.

IIRC bokeh deliberate decided not to include keyboard events in an effort to avoid making it easy to make a keylogger with a bokeh app. I don’t have any major concerns there since any app can be made to do that in end so I’d be happy to expose keyboard events from Panel if you file an issue.