hotkeys-js icon indicating copy to clipboard operation
hotkeys-js copied to clipboard

Function to convert a KeyboardEvent to key string

Open NCC1701M opened this issue 2 years ago • 1 comments

The lib should support the function to convert a KeyboardEvent to a key string.

For example:

hotkeys("*", (evt, handler) => {
   console.log("You've pressed: " + handler.toKeyString());
  // Example output: You've pressed: ctrl+a+s
});

NCC1701M avatar Jun 22 '22 11:06 NCC1701M

I added a similar issue many months ago, but there were no replies:

https://github.com/jaywcjlove/hotkeys/issues/360

User friendliness and customisation suffer because of lack of this feature.

msimic avatar Jun 24 '22 12:06 msimic