I’m processing keyup events and would like to know, whether e.which links to a visible symbol – e.g. UP key (38) isn’t visible, “a” is. Of course it’s just possible to create a list of symbol codes of each type, but I was wondering, whether an easier way exists for JS / JQuery?
I’m processing keyup events and would like to know, whether e.which links to a
Share
If you detect keycodes from 48 to 90 you will detect the visible chars, then the next codes like multiply, decimal point and so on with codes: 106-111.
Another keycodes with “visibles” characters are from 186-192 and 219-222.
So, the visible chars will be 48-90, 106-111, 186-192 and 219-222. The rest no.
More info in this link.
You will try your visible chars, also, with this link.