Catalysis of the transfer of an aldehyde or ketonic group from one compound (donor) to another (acceptor).