Steven
Without looking at the example code I think that the main problem that you have is quite obvious due to the fact that the inputs on PTH and PTC are not controlled by the same KBI. If you just change the port reference you may be causing the code to configure the peripherals functions correctly on the ports but the original code will be configuring the wrong KBI (as noted above, PTH pins are controlled by KBI1 and PTC pins are controlled by KBI0, which means that you at least need also to change the KBI accessed in the example code - and probably also apply clocks correctly at different locations in the project code as well, plus configure and enter different interrupt vectors).
This would mean that the example code is not generic (only works for the example pins) and needs to be completely understood and modified accordingly to the exact pins used. This is why example code is often inflexible and can result in lots of additional development to make what should be trivial changes.
If you look at the uTasker KBI code, which is are real solution rather than just an example, you will find that it uses a look up table to map pins, KBI inputs and KBI controllers so that the user can work on delivering products rather than fighting with data sheets and slipping project schedules. [If you are a professional developer, how much has it cost your company so far to switch KBI pins from PTH to PTC?]. For the KE06:
static const unsigned char _KBI[PORTS_AVAILABLE][32] = {
{(_KBI_0 | 0), (_KBI_0 | 1), (_KBI_0 | 2), (_KBI_0 | 3), (_KBI_0 | 4), (_KBI_0 | 5), (_KBI_0 | 6), (_KBI_0 | 7),
(_KBI_0 | 8), (_KBI_0 | 9), (_KBI_0 | 10), (_KBI_0 | 11), (_KBI_0 | 12), (_KBI_0 | 29), (_KBI_0 | 30), (_KBI_0 | 15),
(_KBI_0 | 16), (_KBI_0 | 17), (_KBI_0 | 18), (_KBI_0 | 19), (_KBI_0 | 20), (_KBI_0 | 21), (_KBI_0 | 22), (_KBI_0 | 23),
(_KBI_1 | 24), (_KBI_1 | 25), (_KBI_0 | 26), (_KBI_0 | 27), (_KBI_0 | 28), (_KBI_0 | 29), (_KBI_0 | 30), (_KBI_0 | 31)},
{(_KBI_1 | 0), (_KBI_1 | 1), (_KBI_1 | 2), (_KBI_1 | 3), (_KBI_1 | 4), (_KBI_1 | 5), (_KBI_1 | 6), (_KBI_1 | 7),
(_KBI_1 | 8), (_KBI_1 | 9), (_KBI_1 | 10), (_KBI_1 | 11), (_KBI_1 | 12), (_KBI_1 | 13), (_KBI_1 | 14), (_KBI_1 | 15),
(_KBI_1 | 16), (_KBI_1 | 17), (_KBI_1 | 18), (_KBI_1 | 19), (_KBI_1 | 20), (_KBI_1 | 21), (_KBI_1 | 22), (_KBI_1 | 23),
(_KBI_1 | 24), (_KBI_1 | 25), (_KBI_1 | 26), (_KBI_1 | 27), (_KBI_1 | 28), (_KBI_1 | 29), (_KBI_1 | 30), (_KBI_1 | 31)},
};
This shows clearly that PTH are connected to KBI1 and PTC to KBI0.
Potentially more complicated are PTD pins since most are connected to KBI0 but two of them are connected to KBI1, making for potentially days of development and debugging when trying to edit examples to get them all working if the details are not initially well understood.
A good generic driver will allow the user to state what he/she wants to connect - eg. PTD0, PTD7, PTC4 and PTH2 to an interrupt callback - and it sorts out the nitty-gritty so that the development is successfully completed within a few minutes instead.
Regards
Mark