I have a rooted XT897 (Motorola Photon Q) running Android 4.1.2, although this should apply to any phone with a physical keyboard. The keyboard on the phone is sorely lacking keys such as <,>,{,},,[,],`,\,|, and ~. It does have a "sym" button that sometimes pulls up a little window in which I can select which symbol not on the keyboard that I would like to type.
Most of the time, it does absolutely nothing. I am aware of Android's key layout files, and I have already modified mine such that the useless Caps Lock key to be a CTRL key instead. However, these do not allow for mapping combinations of keys to other, single keys (as far as I can tell). What I'd like is something like xmodmap, where I could map SYM + P to ] and do that for all the keys.
Is there any way I can do this? The page on the key layout files mentions that it maps linux keycodes to Android keycodes, perhaps I can edit the linux key mapping file. Where would that be? Would that even work?