Are there any built in functions in any JavaScript framework to convert keyCodes into characters? Which accounts the shift property, so it will return the correct characters.
Or we just have to build our own function ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You could use
String.fromCharCode()From MDN :
Syntax :
String.fromCharCode(num1, ..., numN)Parameters :
num1, ..., numN(A sequence of numbers that are Unicode values.)Update:
Here I made a function that would do what you want : http://jsbin.com/ukukuq/2/
(Code)