I think initializing every keyset as an object (that initializes several more in itself) might be the source of the memory hogging.
If you place the keysets in separate files and let the app collect the filename list on startup, initializing only one generic keyset object and replacing it's routines and commands each time you choose another one, you are going to get rid of the memory problem and migrate to a config file architecture.
Heck, if you load all the files in the memory as a binary data and initialize only one at a time, you are going to save more memory
About pairing, I have no idea what that is... It is an old CRT TV that I doubt is smarter than - receive IR commands, execute them...