Use logging in the keys module
Small refactoring
Use logging in the click handler module