I'm trying to revive a pretty old MUD client to run under OS X Mojave (pretty much a telnet client that supports aliases, key bindings and triggers). The code can be found here https://github.com/olostan/mmc
I was successfully able to run it, however it didn't correctly handle the numpad keys. As I figured out that happened because these keys weren't defined in https://github.com/olostan/mmc/blob/master/src/output.c Once I added the following block to "keypad keys" section, it started working properly.
{ "k0", "\033Op", NULL },
{ "k1", "\033Oq", NULL },
{ "k2", "\033Or", NULL },
{ "k3", "\033Os", NULL },
{ "k4", "\033Ot", NULL },
{ "k5", "\033Ou", NULL },
{ "k6", "\033Ov", NULL },
{ "k7", "\033Ow", NULL },
{ "k8", "\033Ox", NULL },
{ "k9", "\033Oy", NULL },
Now I want to do the same for numpad keys with different modifiers (ctrl, alt, shift), for example C-k1, M-k1, S-k1, but I can't find anywhere how to correctly define escape codes for such sequence. I got the codes above from this page - https://www.gnu.org/software/screen/manual/html_node/Input-Translation.html But unfortunately it doesn't describe any combinations with modifiers.
So the question - how do I define escape codes in VT100 format for keypad combinations with modifier keys (shift, alt, ctrl)? I tried setting something like this "\033[1;5Ot" for S-k4 key combination, but none of that worked.