Hi Jeremy,
I created a plugin a while ago, very similar to what you are
suggesting, it will only work with jQuery 1.4 though as it uses the
special event registration hooks.

http://github.com/jollytoad/jquery.keys/blob/master/src/keys.core.js

- Mark Gibson

2010/1/1 Jeremy  Chone <jeremy.ch...@gmail.com>:
> Hi,
>
> Any thought has been given on adding filter on event. For example
>
> a) Called when enter will be pressed.
>
> $("#myTextInputField").bind("keypress:enter",function(e){...});
>
> b) Called when a digit is pressed.
>
> $("#myTextInputField").bind("keypress:0-9",function(e){...});
>
> c) Called when mouseenter with the key shift is pressed
>
> $("#myTextInputField").bind("mouseenter:shift",function(e){...});
>
> d) Called when mouseenter with the keys shift and ctrl are pressed
>
> $("#myTextInputField").bind("mouseenter:shift&ctrl",function(e){...});
>
>
>
> I am not sure this would be the right notation, but it will definitely
> simplify some code and make it less error prone.
>
> Jeremy,
>
> --
>
> You received this message because you are subscribed to the Google Groups 
> "jQuery Development" group.
> To post to this group, send email to jquery-...@googlegroups.com.
> To unsubscribe from this group, send email to 
> jquery-dev+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/jquery-dev?hl=en.
>
>
>

--

You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-...@googlegroups.com.
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en.


Reply via email to