Fix problem when using the numpad

The numpad numbers' code are different from the standard numbers. The
code number starts in 96 (number 0) and ends in 105 (number 9).

The problem is in the String.fromCharCode function because it doesn't
recognize the numpad code numbers.

To fix that this commit was made to calculate the 'correct' key code to
be used in the String.fromCharCode function.