Is there any way to find out if the user pressed the delete key or dot? It has the same keycode in FireFox.
Here is a nice overview regarding browser behavior when it comes to keyboard events:
JavaScript Madness: Keyboard Events (it's quite recent, too: July 7, 2008)
Scroll down to to "3.2. Values Returned on Character Events", there is a table showing what different browsers do.
Bottom line is: It depends.
According to Detecting keystrokes , it is possible, provided that:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.