I'd only keep those of the specific brand + device type in memory. So if you have a TV set of a certain brand, and there are 20 possible keysetsm it is easier to find out which one you need....