The onClick() event of the button must be triggered each time when user presses a certain key (Shift), is it possible to describe this in CSS?

Viewed 17

What I have:

there is a button named "MyButton", which is already used multiple times in the project. The properties like color/width/height of the button are described in CSS.

What I want to do:

To add a new option: the onClick() event of the button must be triggered each time when user presses a certain key (Shift). Is it possible to add a handler for the Shift-keydown to CSS or find any other way to avoid rewriting all files where MyButton is mentioned?

Thank you very much!

0 Answers
Related