* mrbro...@juno.com had this to say on [22 Feb 2010, 22:19:51 -0700]: > > > On Sun, 21 Feb 2010 21:15:08 -0500 Sadrul Habib Chowdhury > <ima...@gmail.com> writes: > > * mrbro...@juno.com had this to say on [21 Feb 2010, 16:58:14 -0700]: > > > > > > I'm trying to update the docs in regards to the new keybindings > > for > > > copy-mode. Inside mark.c, I found the the MarkProcess() routine, > > and > > > inside that is the large switch by the processchar label. My > > problem is > > > that I'm having problems understanding some the cases. For > > example, on > > > lines 667 through 669, I get "case 'j'", that's a literal > > keypress. I get > > > "case '\016', that can come from any ASCII table. But I don't get > > "case > > > '0216'". I don't know where to look these up. > > > > '0216' in copy-mode represents the 'down' arrow key. > > > > > I say this because on lines 667 and 696, they both have comments > > of /* > > > M-C-p */. I would assume the two different cases of 0216 and 0220 > > can't > > > resolve to the same key combination. > > > > That seems to be a typo, as '0220' represents the 'up' arrow key. > > > > > Can someone point me to a table or some kind of (preferably Linux) > > > application that can help me look up these four digit numbers? TIA > > > > In this case, the values are defined in term.c, for 'ku' and 'kd' > > keys. > > The KMAPMDEF specifies the code screen will generate when the key is > > pressed in copy-mode. > > I see 'ku' in term.c, and I understand that that is the termcap name for > Cursor Up . I see that KMAPMDEF ties 0220 to that termcap. But I'm still > not seeing why 0220? Why not 258 or 31337?
I can't say I know for sure, but I think the purpose is to keep the likewise values similar, e.g. ctrl+p is 020, and up arrow is '0220' (i.e. 020 with the eighth bit set). Similarly, down arrow is '0216' (which is ctrl+n with the eighth bit set), 'end' is '0205' (ctrl+e with eighth bit set), 'home' is '0201' (ctrl+a with eighth bit set) etc. Cheers. Sadrul