In order to determine if the CTRL or SHIFT key was held
down when clicking with the mouse, our project needs
the ctrlKey and shiftKey (Internet Explorer only)
properties to be supported on the JavaScript
com.gargoylesoftware.htmlunit.javascript.host.Event
object. Adding these properties would allow them to be
queried when executing JavaScript code in HtmlUnit.
One possible implementation suggestion would be a new
click() method on ClickableElement which would take a
parameter indicating which key (or keys) was held down
and then would set the appropriate properties in the
Event object instantiated inside the click() method.
Logged In: YES
user_id=402164
One year later...
The same question as usual: can you provide a unit test? Do
you know what are the Firefox counterparts?
Logged In: YES
user_id=950730
Originator: NO
Another year later...
Sample HTML can be found at http://www.javascripter.net/faq/ctrl_alt.htm
Logged In: YES
user_id=950730
Originator: NO
event.shiftKey, event.ctrlKey, and event.altKey are supported in FF as well.
Fixed in SVN, many thanks.