Seems to work pretty well. Limiting characters to alphanumeric is a big help. Couple things you might want to consider:
The immediate clearing of the name limits some perfectly acceptable names.
Assassin is unusable due to "ass" being in the word. So is the word Pass.
You don't account for mixing of numbers and letters.
Words like b1tch and c0ck work.
Maybe you could test the name when it is submitted, not after each character is typed.
Good luck! This is a tough hurdle to jump.