Changed the mouse handling to use strings instead of constants.

Using constants worked OK, but it was inconsistent and could make
config files between implementations gratuitously incompatible.
The change is easier to make now, when backward compatibility
doesn't have to be worried about.