I have the function keys working well in emacs. Some function keys are bound to emacs functions and some are bound to screen functions (like to switch windows).
I usually use putty as an ssh terminal program but I have bindings for sun and xterm. In emacs, I bind a key like this in my .emacs: (global-set-key '[f3] 'scroll-down-in-place) (global-set-key "^[[13~" 'scroll-down-in-place) (global-set-key "^[[226z" 'scroll-down-in-place) (global-set-key '[f4] 'scroll-up-in-place) (global-set-key "^[[14~" 'scroll-up-in-place) (global-set-key "^[[227z" 'scroll-up-in-place) If you want to discover the function key sequence of one of the function keys, I suggest you press ctrl-q before the function key and it will insert it's sequence into the buffer. To bind the function keys to screen things, I put this in my .screenrc: # f9,f10,f11,f12 selects window 3,0,1,2 bindkey -k k9 select 3 bindkey -k k; select 0 bindkey -k F1 select 1 bindkey -k F2 select 2 # same thing but for Sun keyboard bindkey "\033[232z" select 3 bindkey "\033[233z" select 0 bindkey "\033[192z" select 1 bindkey "\033[193z" select 2 I don't think I ever did this for xterm, but you can see the general idea. Michael Grant On Jan 21, 2008 5:48 PM, <[EMAIL PROTECTED]> wrote: > Hi Dear friends, > I try to use emacs under screen environment, I bind some oftenly used > function to F1/F2/F3/F4 under > emacs, when I try to > use these, it seems not work. Can anyone help me on this? Thanks a lot. :) > > Here is my .screenrc file: > ------------------BEGIN---------------------- > #kill startup message > startup_message off > > defflow off > > # define a bigger scrollback, default is 100 lines, I like large scrollback > defscrollback 1024 > > # An alternative hardstatus to display a bar at the bottom listing the > # windownames and highlighting the current windowname in blue. (This is only > # enabled if there is no hardstatus setting for your terminal) > hardstatus on > hardstatus alwayslastline > hardstatus string "%{.bW}%-w%{.rW}%n %t%{-}%+w %=%{..G} %H %{..Y} %m/%d %C%a " > # caption always "%?%F%{-b 4w}%:%{-b bb}%? %H | %l | %m-%d %c |%?%F%{-b > 4w}%?%L=%-Lw%45>%{-b > w4}%n%f* %t%{-}%+Lw%-0<" > > # key bingdings > # remove some stupid/dangerous key bindings > bind k > bind ^k > bind . > bind ^\ > bind \\ > bind ^h > bind h > bind l windowlist > bindkey ^[, prev # use Alt+, to show preview screen window > bindkey ^[. next # use Alt+. to show next screen window > > # Our warning of activity > activity "Activity in %t(%n)" > > # Escape key is C-z. (I use C-a too much in Emacs.) > #escape ^zz > # Escape key is ` (I use C-a too much in Emacs) > escape `` > --------------------------END---------------------------- > > > > _______________________________________________ > screen-users mailing list > screen-users@gnu.org > http://lists.gnu.org/mailman/listinfo/screen-users > > _______________________________________________ screen-users mailing list screen-users@gnu.org http://lists.gnu.org/mailman/listinfo/screen-users