Fix bug with postKeyPressed event (state was not restored properly)
Check if the event has been accepted (prevent conflict with code completion)
Fix onSettings changed signature
CodeCompletion: refactoring to work with jedi