keymaster
keymaster copied to clipboard
Added triggerKey
Hi,
It is nice to be able to trigger programatically a given key/shortcut.
Here's a patch to allow it, with proper tests.
Please consider for inclusion :-)
Excellent work. This came up huge for helping write tests/specs for a bit of work depending on keymaster.
Thanks @toots!
I think this is the same use case for PR #9 . As you can see, there's a better way to do the same without a triggering system.
As @jayroh mentioned above and although it is unfortunately not very common yet in JS webapps, there is a strong case in favor of being able to trigger
a key in testing/specing.
Until keymaster
has such support for automated tests, I would not consider it fit for serious release in one of my webapp..
@toots You realize that keymaster comes with automated tests that tests triggering keys with the proper DOM events for this?
Yes, I've seen it but I would like to be able to write tests that do not rely on the DOM in order to test things in a more modular way..