There are probably many missing keys, at least the following should be added: esc O A up esc O B down esc O C right esc O D left (seen in #483086)
I updated the mappings for the above 4 codes in svn commit 249. Are there any more that should be done? I noticed that the original mappings work fine for ssh sessions and the ones in the description above seem to come from a gdm session. Would the terminal emulators employed by each cause the mappings to be different? If so, I wonder how we solve this problem reliably?
Best would be to use terminfo, but $TERM is not available in the message. Perhaps we target just the terminals in /lib/terminfo (chosen as important by the ncurses maintainer) and add all input sequences for these.
OK, I will wait for further suggestions on this one.
Created attachment 335756 [details] Add keys for terminals from ncurses-base The attached patch adds all keys described in terminfo in the ncurses-base package; there are some unavoidable conflicts, in which case the Linux variant, or the more popular variant (measured by the number of different terminal descriptions, not by actual usage) was chosen. The patch also fixes an incorrect leading comma characters produced by aureport.
(I didn't do any performance testing, the linear search might eventually be found too slow. In that case the keys should probably be built in to a trie.)
Applied to svn.
closing since this was pushed out.