Detect key pressed outside of input

Is there an option to detect which key got pressed outside of the input component in general, or inside the multiline textarea? I tried to create a custom component, but failed doing so.
Has anyone tried this before and can share some insights?

Is there an option to detect which key got pressed outside of the input component in general

You could detect ALL keyboard events, and after that separate some when checking target property of event object.

There is a custom code that you could add to On Page Enter handler.

document.addEventListener('keydown', (event) => {
  console.log({event})
})

or inside the multiline textarea

Add the next custom code to the block that contains your text area(On Mounted Handler)

const textArea = document.querySelector('.MY_TEXT_AREA')

textArea.addEventListener('keydown', (event) => {
  console.log({event})
})

MY_TEXT_AREA is a class of your textarea, logic should be written instead of console.log that I added.

Regards, Dima.

Works perfectly fine! Thanks a lot. This was really bugging me out :sweat_smile: