I want to simulate a long key press of backquote key without selecting certain dom element, how can we achieve this using cypress? I have a functionality on my web app that will trigger when this key is pressed.
I have tried several code below and nothing works.
// 1st
cy.get('#sidepanel').trigger('keydown', { keycode: 192, release: false })
// 2nd
cy.get('body').type('`', { release: false })
// 3rd
cy.get('body').trigger('keydown', { keycode: 192, release: false })
cy.wait(15000)
cy.get('body').trigger('keyup', { keycode: 192, release: false })
I expect it will simulate the long and hold key press of backqoute, but it looks like the typing of backqoute only happens once and not hold.
