Re: How to make F1/F2/F3/F4 usable in screen emacs?

2008-01-30 Thread Alain Bench
Hello Phil,

 On Tuesday, January 22, 2008 at 9:09:39 -0500, Phillip Michael Gregory wrote:

> PuTTY sends the same escape sequences as (IIRC) the linux console for
> F1-F4 by default. This is a problem because it sets its $TERM to
> 'xterm' which on many systems has different F1-F4 escape sequences.

Indeed PuTTY and Xterm may differ on F1-F4, but they also differ on
a surprisingly great number of other things. TERM=xterm under PuTTY is
an heresy. Fortunately one can fix this changing in PuTTY's config ==>
Connection ==> Data ==> Terminal-type string "xterm" to something like
"putty-256color". Of course this requires having this "putty-256color"
terminfo entry installed on all hosts you connect to.

One can quite safely generalize: TERM=xterm under anything else than
the real Xterm is also an heresy. ;-)


Bye!Alain.
-- 
« if you believe in alleged compatibility, I've got a bridge to sell you. »


___
screen-users mailing list
screen-users@gnu.org
http://lists.gnu.org/mailman/listinfo/screen-users


Re: How to make F1/F2/F3/F4 usable in screen emacs?

2008-01-22 Thread Phil! Gregory
* [EMAIL PROTECTED] <[EMAIL PROTECTED]> [2008-01-22 22:29 +0800]:
> Acturally I can use F1-F4 under normal mode in putty, but when I use
> screen and open emacs under screen, F1-F4 is invalid... :(

It could still be a termcap issue.  Just for fun, try changing the
function key escape codes to Xterm R6 and see what happens..

> BTW, where is Putty config files under windows XP? :)

In case you're serious:

Run PuTTY.  In the lefthand pane, click on 'Keyboard', under 'Terminal'.
In the section labeled "The Function keys and keypad", make sure "Xterm
R6" is selected.  Again in the lefthand pane, click on 'Session'.  Under
"Load, save or delete a stored session", click on "Default Settings", then
"Save".

-- 
...computer contrarian of the first order... / http://aperiodic.net/phil/
PGP: 026A27F2  print: D200 5BDB FC4B B24A 9248  9F7A 4322 2D22 026A 27F2
--- --
If your weakest troops fail to eliminate a hero, send out your best troops
instead of wasting time with progressively stronger ones as he gets closer
and closer to your fortress.
   -- Evil Overlord's Handbook, entry 80
 --- --


___
screen-users mailing list
screen-users@gnu.org
http://lists.gnu.org/mailman/listinfo/screen-users


Re: How to make F1/F2/F3/F4 usable in screen emacs?

2008-01-22 Thread pei . linux
Acturally I can use F1-F4 under normal mode in putty, but when I use screen and 
open
emacs under screen, F1-F4 is invalid... :(
BTW, where is Putty config files under windows XP? :)

Phil! Gregory <[EMAIL PROTECTED]> writes:

> * pei.linux-9Onoh4P/[EMAIL PROTECTED]  
> [2008-01-22 18:49
> +0800]:
>> Thanks Michael, :) It's work fine for me. But I am still wondering. Does 
>> Putty steal away
> F1/F2/F3/F4 keys or other
>> applications? 
>
> PuTTY sends the same escape sequences as (IIRC) the linux console for
> F1-F4 by default.  This is a problem because it sets its $TERM to 'xterm',
> which on many systems has different F1-F4 escape sequences.  You may be
> able to fix yhe behavior by going into the PuTTY config, changing the
> setting about the function keys to (again, IIRC) 'xterm R6' and saving
> that in your default settings.
>
> -- 
> ...computer contrarian of the first order... / http://aperiodic.net/phil/
> PGP: 026A27F2  print: D200 5BDB FC4B B24A 9248  9F7A 4322 2D22 026A 27F2
> --- --
> A good question is never answered.  It is not a bolt to be tightened into
> place but a seed to be planted and to bear more seed toward the hope of
> greening the landscape of idea.
>-- John Ciardi
>  --- --



___
screen-users mailing list
screen-users@gnu.org
http://lists.gnu.org/mailman/listinfo/screen-users


Re: How to make F1/F2/F3/F4 usable in screen emacs?

2008-01-22 Thread Phil! Gregory
* [EMAIL PROTECTED] <[EMAIL PROTECTED]> [2008-01-22 18:49 +0800]:
> Thanks Michael, :) It's work fine for me. But I am still wondering. Does 
> Putty steal away F1/F2/F3/F4 keys or other
> applications? 

PuTTY sends the same escape sequences as (IIRC) the linux console for
F1-F4 by default.  This is a problem because it sets its $TERM to 'xterm',
which on many systems has different F1-F4 escape sequences.  You may be
able to fix yhe behavior by going into the PuTTY config, changing the
setting about the function keys to (again, IIRC) 'xterm R6' and saving
that in your default settings.

-- 
...computer contrarian of the first order... / http://aperiodic.net/phil/
PGP: 026A27F2  print: D200 5BDB FC4B B24A 9248  9F7A 4322 2D22 026A 27F2
--- --
A good question is never answered.  It is not a bolt to be tightened into
place but a seed to be planted and to bear more seed toward the hope of
greening the landscape of idea.
   -- John Ciardi
 --- --


___
screen-users mailing list
screen-users@gnu.org
http://lists.gnu.org/mailman/listinfo/screen-users


Re: How to make F1/F2/F3/F4 usable in screen emacs?

2008-01-22 Thread Michael Grant
As far as I know, when you press an F key in Putty, Putty sends the
escape sequence to the terminal.

Michael

On Jan 22, 2008 11:49 AM,  <[EMAIL PROTECTED]> wrote:
> Thanks Michael, :) It's work fine for me. But I am still wondering. Does 
> Putty steal away F1/F2/F3/F4 keys or other
> applications?
>
>
> "Michael Grant"  writes:
>
> > 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,   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-mXXj517/[EMAIL PROTECTED]
>
> >> http://lists.gnu.org/mailman/listinfo/screen-users
> >>
> >>
>
>
>
> ___
> 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


Re: How to make F1/F2/F3/F4 usable in screen emacs?

2008-01-22 Thread pei . linux
Thanks Michael, :) It's work fine for me. But I am still wondering. Does Putty 
steal away F1/F2/F3/F4 keys or other
applications? 

"Michael Grant"  writes:

> 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,   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-mXXj517/[EMAIL PROTECTED]
>> http://lists.gnu.org/mailman/listinfo/screen-users
>>
>>



___
screen-users mailing list
screen-users@gnu.org
http://lists.gnu.org/mailman/listinfo/screen-users


Re: How to make F1/F2/F3/F4 usable in screen emacs?

2008-01-21 Thread Michael Grant
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