Friday, May 10, 2024
 Popular · Latest · Hot · Upcoming
186
rated 0 times [  188] [ 2]  / answers: 1 / hits: 40444  / 14 Years ago, fri, february 11, 2011, 12:00:00

I'm wondering if there's a way to capture the iPhone's virtual keyboard's done button event, using JavaScript?



Basically, I just want to be able to call a JS function when the user clicks done.


More From » ios

 Answers
3

The done key is the same as the enter key. So you can listen to a keypress event. I'm writing this using jQuery and i use it in coffee script so I'm trying to convert it back to js in my head. Sorry if there is an error.



$('someElem').bind(keypress, function(e){
// enter key code is 13
if(e.which === 13){
console.log(user pressed done);
}
})

[#93776] Thursday, February 10, 2011, 14 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
asalewisc

Total Points: 742
Total Questions: 98
Total Answers: 112

Location: Jordan
Member since Wed, Jun 17, 2020
4 Years ago
;