The .kl file is a Key Layout file that maps physical scan-codes (which the keyboard driver spits out) to Androids key-codes, the .kcm is a Key Character Map which maps those key-codes to characters or actions (and allows you to have different binding for combinations of modifiers (ctrl, alt, shift, fn) and keys). The .kcm can also remap scan-codes to different key-codes, so I'd recommend leaving the .kl alone unless there's a good reason to edit that one.
In the kcm file you can map a scan-code to a key-code by a statement like:
map key 158 ESCAPE
And a key-code to a character like: