Fix formatting not happening with hardware keyboard

In fact, Samsung is so bad, that the numerical keyboard on a Galaxy S3 phone under Android 4.3 is considered a Hardware Keyboard, the onKeyDown event was not fired. This fix make this lib works on every Android phone and version.
Merge pull request #7 from Dimillian/patch-2

Fix formatting not happening with hardware keyboard