Added reference count for mouse buttons. Removed extra computations in QtKeyMapperBase::isModifier method.