Keto isn’t necessarily contrary to IIFYM. It’s really just a different set of macros. If you are switching from IIFYM you can track the same way. You just get to have a low carb number and a higher fat number. Plus, you lose your cravings for sweets (after a few days).
I have a macros calculator. It is here. Let’s plug in my current numbers.
Macro Levels to Maintain Current Weight
Protein: 112 grams, 448 calories, 19.9% of calories (minimum)
Net Carbs: 20 grams, 80 calories, 3.6% of calories (maximum)
Fat: 191 grams, 1719 calories, 76.5% of calories (maximum, less if you exceed protein)
There’s no pizza, tacos, ice cream or gummy bears on this diet. But you will get used to eating real food. It might take a while but the desire for junk goes away with the cravings. This is pretty much all that there is to it.
You can safely go under on carbs. You can safely go over on protein. If you go over on protein just ease up on your fats.
If you want to lose weight, you just need to eat less fat. If you want to gain weight, you eat more fat.