keymap or terminal issues across BSD's

I've been trying to get a BSD (FreeBSD, NetBSD, OpenBSD) operating on an old desktop PC and a new laptop. One of the unexpected differences between the different operating systems relates to keymaps and the use of the keyboard on the console, that is, without X. This is noticeable immediately when editing configuration files in vi.

When I accept the default keymap in FreeBSD, hitting the END button in vi will take me to the end of a line. In NetBSD and OpenBSD, using the default keymap or selecting the 'us' keymap, it will change the case (upper or lower) of the selected character. When I run vi in a terminal window inside of X in NetBSD or OpenBSD, the END key behaves as it does in FreeBSD.

Is this a keymap issue? Is it a $TERM issue? Is it something else?

Thanks,

Andrew
 
It's a complicated issue with a bunch of different parts. The end key on FreeBSD produces Esc [ 4 ~. ~ changes case in vi(1), indicating the Esc is not being sent (the [4 is just an error and ignored). Why the Esc is not being generated by the other BSDs, I don't know. Looking at what their keymaps send when the End key is pressed would help, and it would not be surprising if they addressed the question in manuals or FAQs. It could also involve a configuration setting for vi(1).

Consistent BackSpace and Delete Configuration can be helpful.
 
Back
Top