add wxYield to make sure all event was executed.
wxX11 could not get UnicodeKey yet, not wxUniversal. And use AND instead OR. otherwise the check not work.