Fixing issue with this lib not working with firefox. Using charCode instead of keyCode