Hi, I'm trying to add keybindings to a UI, and would like to simulated a mouse click on a child element from the keyboard. Something line
_="on keyup[key=='a'] trigger click on the first <button.yes/> in me"
but this doesn't work. To test, "on keyup[key=='a'] toggle .bg-orange-300 on the first <button.yes/> in me" works fine to change the attribute of the target element, but I want to simulate a click on the element that triggers the existing event handlers exactly like the user had used a mouse. Is this possible?
Hi, I'm trying to add keybindings to a UI, and would like to simulated a mouse click on a child element from the keyboard. Something line
_="on keyup[key=='a'] trigger click on the first <button.yes/> in me"
but this doesn't work. To test,
"on keyup[key=='a'] toggle .bg-orange-300 on the first <button.yes/> in me"
works fine to change the attribute of the target element, but I want to simulate a click on the element that triggers the existing event handlers exactly like the user had used a mouse. Is this possible?