only use ispunct for key.code