Modified user input example to print mouse button events