Clear text input on right click (and config option to disable)

Based on issue #11
Also includes:
 - General cleanup of affected files (indentation character, unused override)
 - Support for differentiating mouse buttons.