I everyone, I must convert a character to keyCode... I must not convert to charCode...
For example if I have a "." (a dot) I need to obtain "190" as result.. but If I do
".".charCodeAt(0)
I obtain "46"... "46" is not the result I want... I have also tried to do
String.fromCharCode(190);
In this case I do not obtain "." but I obtain "3/4".
How can I convert the character to obtain "190"?
UPDATE I must compare the input from the keyboard with a value in a "string"... I need to do something like this
window.addEventListener('keydown', function(e){
if(e.keyCode == ".") <-- I need to get the keyCode of the "."
{
//Do something
}
});
That is an example.... I do not know which is the char I could need to compare... It could be a ".", or a ",", o something else...
Thank you all.