Has this been occurring for a long time or did it just start recently?
if recently, try what @ocnbrze suggested. A restart often fixes a lot of random glitches that pop up every so often.
If you've been fighting with this for long time however, that requires more attention. The lock screen keyboard is part of the installed Android operating system on your phone, separate from the keyboard app itself, so it's just a very basic keypad. Try going into the Settings menu and tweaking some of the options in the Lock screen menu -- change your password or switch to a different lock screen (i.e. pattern).