Is there any way to detect while a key is pressed using event handler such as onkeyup, onkeydown in javascript in android based browser? I have called the following function using both onkeyup and onkeydown,both of which shows Unidentified result.
function fun(e)
{
alert(e.key);
}
Calling the above javascript function using event handler:
<input type="text" onkeyup="fun(event)" onkeydown="fun(event)">
function fun(e) {
console.log(e.key);
}
<input type="text" onkeyup="fun(event)" onkeydown="fun(event)">