Bug Tracker

Changes between Initial Version and Version 1 of Ticket #9101, comment 3


Ignore:
Timestamp:
May 4, 2011, 3:08:36 PM (9 years ago)
Author:
gryzzly
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #9101, comment 3

    initial v1  
    11> We don't know the button you're trying to fake, there is absolutely no information we can use to determine it.
    22
     3
     4{{{
    35$(document).trigger($.Event('keypress', {
    46    keyCode: 64
    57}))
     8}}}
    69
    710As far as I know and have used for quite a while, which == keycode when e.keycode isn't available:
     11
     12{{{
    813var which = e.keyCode || e.which; // this is the code I've been using for some time
     14}}}
     15
    916
    1017Hence when I create jQuery.Event object I expect it to normalize keyCode to become .which, just as it does for the real events.