Menu

#79 add support to event for IE ctrlKey & shiftKey properties

closed
None
5
2012-10-21
2005-03-22
No

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.

Discussion

  • Marc Guillemot

    Marc Guillemot - 2006-03-01

    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?

     
  • Ahmed Ashour

    Ahmed Ashour - 2007-04-21

    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

     
  • Ahmed Ashour

    Ahmed Ashour - 2007-05-17

    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.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.