Fixes text filtering being 1 char behind

Fixes problem introduced when switch from keyup to keydown. Now they
are used both.