If I use the following .emacs file, I am able to go to the beginning/end of the current line using the home/end keys as I would expect.
(keyboard-translate ?\C-h ?\C-?) (add-to-list 'load-path "/home/sam/programs/go/go/misc/emacs/" t) (require 'go-mode-load) (global-set-key [kp-home] 'beginning-of-line) ; [Home] (global-set-key [home] 'beginning-of-line) ; [Home] (global-set-key [kp-end] 'end-of-line) ; [End] (global-set-key [end] 'end-of-line) ; [End]
However, if I open up a screen session it does not function like this (the [home] key still brings me to the beginning of the buffer for some reason).
Here is my .screenrc file if anyone can spot anything funky in there:
term xterm defutf8 on defflow off startup_message off # terminfo and termcap for nice 256 color terminal # allow bold colors - necessary for some reason attrcolor b ".I" # tell screen how to set colors. AB = background, AF=foreground termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm' #use bash as the default login shell defshell -bash
EDIT: Apparently, using M-x describe-key (as nschum suggested) says that [begin] is getting triggered when I press the home key on my keyboard when running emacs inside screen. When I run emacs outside of screen describe-key refers to [home] as expected. It looks like the "defutf8 on" is the only keyboard-related entry in my .screenrc - is there anything else in there that might be causing issues?