1

Pardon me if I'm asking a naive question as I'm new to Dash. I'm trying to build a login page for a website and want to map F2 function key to Register Now option and ENTER key to press Sign In button. The idea is, if someone fills username & password and press Enter(instead of using Mouse/Touchpad to go to Sign In button and press the same), the callback attached to Sign In button should be triggered.

Could you please help me do so in plotly dash.

Swati
  • 43
  • 1
  • 5

1 Answers1

0

This isn't really a Dash question at all, you will need some JavaScript to capture key presses on your page. See Binding arrow keys in JS/jQuery to point you in the right direction for the JS portion .

You will then need to load that script when your Dash app starts which you can do as set out in the external resources Dash documentation.

Ian Ash
  • 1,087
  • 11
  • 23