2 of 2 Removed [terminal] tag, as it seemd to be taking precedence over the [gnu-screen] tag in the tab-title.

How to override the copy-mode behavior of the Home and End keys in GNU Screen?

I use screen a fair amount and would like the Home and End keys to simply go to the beginning or end of the current line, rather than the default, which is to go to the global beginning or global end of screen's whole history for the current window.

Doing bindkey -m -k "kh" stuff 0 and bindkey -m -k "kH" stuff $ has the desired effect while in copy mode, but since -m bindings also affect command-input mode, this effectively disables use of of Home and End while typing commands, since it causes literal '0' and '$' to be inserted while the cursor is in the command-bar.

Is there a way to tame these keys without simultaneously breaking them for command-entry?