While working with Vue, I am attempting to modify a button's behavior when the Shift key is pressed. Adjusting the behavior of the click
event was straightforward:
@click.exact="goForward"
@click.shift="goBackward"
However, I am facing challenges in updating the text displayed on the button to indicate this change. The default text is Forward
, and I want it to switch to Backward
when the Shift key is held.
I experimented with @mouseover.shift
but found it inadequate since it does not cover scenarios where the user first hovers over the button and then holds down the Shift key.