Chemical and electrical synapses shape the dynamics of neuronal networks. Numerous theoretical studies have investigated how each of these types of synapses contributes to the generation of neuronal oscillations, but their combined effect is less understood. This limitation is further magnified by the impossibility of traditional neuronal mean-field models -also known as firing rate models, or firing rate equations-to account for electrical synapses. Here we introduce a novel firing rate model that exactly describes the mean field dynamics of heterogeneous populations of quadratic integrate-and-fire (QIF) neurons with both chemical and electrical synapses. The mathematical analysis of the firing rate model reveals a well-established bifurcation scenario for networks with chemical synapses, characterized by a codimension-2 Cusp point and persistent states for strong recurrent excitatory coupling. The inclusion of electrical coupling generally implies neuronal synchrony by virtue of a supercritical Hopf bifurcation. This transforms the Cusp scenario into a bifurcation scenario characterized by three codimension-2 points (Cusp, Takens-Bogdanov, and Saddle-Node Separatrix Loop), which greatly reduces the possibility for persistent states. This is generic for heterogeneous QIF networks with both chemical and electrical coupling. Our results agree with several numerical studies on the dynamics of large networks of heterogeneous spiking neurons with electrical and chemical coupling.