If the pressure is kept the same, is all the energy exchanged turned into heat?
Not necessarily. Work can still be done by change of volume.
It is worth getting these ideas clear before proceeding further. So let us look at a few real world examples.
Suppose we have a calorimeter and we measure the 'heat of a chemical reaction'. What does this mean i.e. what have we measured? Well as I keep stressing it depends upon the conditions.
Consider the neutralisation of hydrchloric acid by sodium hydroxide. When we take 1 mole of each in solution and allow them to react we measure the same heat whether we do this in an open beaker or in a vessel full to the brim and sealed.
{\rm{HCl(aq) + NaOH(aq) = NaCl(aq) + }}{{\rm{H}}_2}{\rm{O(l)}}
Whichever way we measure the result is -57.1 kJ/mole
All the energy of this reaction has come from the difference between the bond energies in the new and old arrangements.
In this case all the reactants and products remain in solution so there is no change in volume and no work is done.
\Delta E = {q_v} = \Delta H = {q_p}
Now consider the reaction of an acid on zinc granules dropped into solution.
{\rm{Zn(s) + 2}}{{\rm{H}}^ + }{\rm{(aq) = Z}}{{\rm{n}}^{2 + }}{\rm{(aq) + H(g)}}
If we perform this in an open beaker, we will measure an evolved heat of -152 kJ/mole
If however we perform the same experiment in a sealed vessel, as before so no hydrogen gas is liberated we measure
-154.47 kJ/mole
So what is the difference?
Well in the in open beaker is the heat evolved is the enthalpy change
{q_p} = \Delta H = - 152
In the second the system is at constant volume. Since \Delta V = 0, no work is done and all the internal energy changes appear as heat.
\Delta E = {q_v} = \Delta H - 2.47 = -154.47
What of this extra -2.47?
Well in the open beaker \Delta V is not zero so using
\Delta E = \Delta H - P\Delta V = \Delta H - \Delta nRT
Since P\Delta V = \Delta nRT from the gas law and \Delta n is the change in the number of moles of gas.
So this is work done by the system expending some of its change in internal energy on work expanding a mole of hydrogen against atmospheric pressure in the open beaker.
Calorimeter measurement at constant volume measure the change in internal energy
Calorimeter measurements at constant pressure measure the change in enthalpy
We cannot measure at both contant volume and pressure at the same time.