We present new sets of pion and kaon fragmentation functions obtained in NLO combined analyses of single-inclusive hadron production in electron-positron annihilation, proton-proton collisions, and deep-inelastic lepton-proton scattering with either pions or kaons identified in the final state. At variance with all previous fits, the present analyses take into account data where hadrons of different electrical charge are identified, which allow to discriminate quark from anti-quark fragmentation functions without the need of non trivial flavor symmetry assumptions. The resulting sets are in good agreement with all data analyzed, which cover a much wider kinematical range than in previous fits. An extensive use of the Lagrange multiplier technique is made in order to assess the uncertainties in the extraction of the fragmentation functions and the synergy from the complementary data sets in our global analysis.