> But, it's error-prone to have two places to keep track of what keys > get mapped. So, I fixed this for myself a while ago by removing > mappedkeys entirely. Patch attached.
I agree with you that it is error-prone, but if we remove it then each time a key is pressed it is necessary look up in table, but the usual case (a latin key) it is the worst case, look in the table until the end. Since keyboard typing depend of the user, it is not a big problem (good typists can type 200 keys per minute) so the performance penalty will not be able noticeable. Doing a binary search (bsearch call) is not easy, since define a order in these key assignation is hard, so I think the best strategy is the sequencial search. My suggestion is applying your patch and try get a better solution.