javascript - Why do numpad keycodes differ on windows v mac? -


using chrome, given following code (which paste console):

function key(e) { console.log(e.keycode); }; window.addeventlistener("keydown", key, false); 

the keycodes on numpad seem vary. results below show keydown code numpad 0:

mac (num lock on/off) keydown=48

win (num lock on) keydown=96

win (num lock off) keydown=45

can explain these differences please (since breaking our code)?

is expected or experiencing unusual behaviour? thanks

i believe mac numeric keypad maps normal number strip, not special key. if type normal 0, keycode 48 on windows.


Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

android - IllegalStateException: Cannot call this method while RecyclerView is computing a layout or scrolling -