Hi,
I'm guessing you're working w/ a form, you see, Android's "Enter" key behavior when working w/ forms is different then the regular "Enter" key you get from the keyboard in other cases, the thing is, it doesn't have the 13 key-code, actually, it doesn't have a keyCode at all!
All it does is fire the submit event of the form.
Let's say you want to "grab" the time the user clicks the "Enter" key on the Andorid's keyboard, what you need to do is attach to the submit() event:
- $("#myForm").submit(function(){
- // you're logic here
- }
One thing to keep in mind, in case you have an on-screen submit button (i.e
<input type="submit>), which I'm guessing you do, it takes you to same place (
submit() event) so if you have different behaviors in both cases, you might just want to attach the on-screen submit button to a different event, how? either by replacing it w/ a "regular" button or by attaching to the
click() event and using
event.preventDefault().
Hope I helped,
Omri.