Measurement of CP violation in the phase space of B±K± pi+ pi- and B±K± K+ K- decays