A keyboard shortcut to .blur() the active component

Hi,

I recently added shortcuts to my app. The main ones are like this:

  • "/" to execute textFilter.focus(), where textFilter is a text input field
  • "p" to execute price.focus(), where price is a number input field

I've created various shortcuts to .focus() to various fields, or to select rows in a table. The problem, though, is that when I'm actively focused in a field, I can't execute any other keyboard shortcuts. Even ones that would use ctrl or command. So if I focus to a certain field I'm a bit stuck in that field and the surrounding fields. I would really like a way to .blur() without touching my mouse so I can go back to the default unfocused state of the app where any shortcut works again.

Any ideas?

Thanks,
Adhi

Hey @adhi-r

Unfortunately, I don't know of a shortcut for blurring components, the fact that shortcuts aren't working when a component is focused is on the radar of our devs though and I can let you know here as soon as that has been fixed! Curious if anyone else has workarounds here.

Hey @adhi-r!

Just want to call out that keyboard shortcuts should now be working when already focused in a field as long as it has the Command or Ctrl modifier (as mentioned here).