Re: backspace shows ^? in serial communication

2013-02-28 Thread Giorgos Keramidas
On 2013-02-26 23:40, s m sperado_n...@yahoo.com wrote:
 hello all,

 i have problem with backspace in freebsd 8.2. when i run a serial
 program to communicate via a serial port to the other system,
 backspace shows ^? in opened terminal.  i use termios and fcntl to
 open, read, write and close serial port. i set erase and erase2 for
 ttyu2(my serial port) but backspace shows ^? yet.

 any body knows what i'm doing wrong? just erase and erase2 should be
 set to backspace works correctly or any other options should be set?

Just run:

stty erase '^?'

in your serial console terminal.  The backspace key sends ^? so you are
seeing it because it's not mapped to 'erase'.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: backspace shows ^? in serial communications

2013-02-11 Thread s m
thanks Robert,
i try it before but nothing happened.
do you know how i can set erase and erase2 for stty via termios structure?
and what should be their value to backspace correct well?

On Wed, Feb 6, 2013 at 3:13 PM, Robert Bonomi bon...@mail.r-bonomi.comwrote:

  From owner-freebsd-questi...@freebsd.org  Wed Feb  6 00:19:04 2013
  Date: Wed, 6 Feb 2013 09:44:37 +0330
  Subject: backspace shows ^? in serial communications
  From: s m sam.gh1...@gmail.com
  To: freebsd-questions freebsd-questions@freebsd.org
 
  hi all
 
  i have a problem with backspace in serial communications. i have a
  freebsd8.2 box with a serial card on it. when i connect to other freebsd
  box via serial port backspace does not act as i expected. backspace shows
  ^? on screen. i searched alot and find out that stty has two parameters
  -erase and erase2- to identify erase characters in terminal and they
 should
  be set correctly. i set erase and erase2 to ^? by stty erase \^? and
  stty erase2 \^? commands but nothing happened.
  please let me know how i can fix it. i know it is simple issue but i
 really
  do not know how to do that.

   stty erase {press the backspace key}

 Then hit the enter/return key

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: backspace shows ^? in serial communications

2013-02-06 Thread s m
thanks for your answer.
you know, i have a freebsd box (something like router) which i connect to
it by putty or other terminal programs (cu,...). this router has a serial
card and i have a c program to open and manage serial ports. now when i run
this c program and connect to the third freebsd box, backspace shows ^?.
now i don't know where is problem and for which system terminal settings
should be checked.
from you explanation i think that i should check serial settings in c
program in the router box. am i right?
please let me know what should i do to this program (c program in router
box) show backspace correctly when i connect by different serial programs
to router box and run it.

thanks

On Wed, Feb 6, 2013 at 10:20 AM, Polytropon free...@edvax.de wrote:

 On Wed, 6 Feb 2013 09:44:37 +0330, s m wrote:
  hi all
 
  i have a problem with backspace in serial communications. i have a
  freebsd8.2 box with a serial card on it. when i connect to other freebsd
  box via serial port backspace does not act as i expected. backspace shows
  ^? on screen. i searched alot and find out that stty has two parameters
  -erase and erase2- to identify erase characters in terminal and they
 should
  be set correctly. i set erase and erase2 to ^? by stty erase \^? and
  stty erase2 \^? commands but nothing happened.
  please let me know how i can fix it. i know it is simple issue but i
 really
  do not know how to do that.

 If I remember correctly, ^? is delete, ^H is backspace. You
 should check your terminal emulator if it outputs ^? instead
 of ^H when you press the backspace key.

 FreeBSD's default configuration handles keys correctly (if
 you have the proper terminal emulation set, e. g. vt100 or
 vt220 for your serial line), so there's probably something
 wrong with the settings of the terminal program you're using.

 For comparison:

 % echo $TERM
 xterm
 % stty -a
 speed 9600 baud; 24 rows; 80 columns;
 lflags: icanon isig iexten echo echoe echok echoke -echonl echoctl
 -echoprt -altwerase -noflsh -tostop -flusho -pendin -nokerninfo
 -extproc
 iflags: -istrip icrnl -inlcr -igncr ixon -ixoff -ixany -imaxbel -ignbrk
 -brkint -inpck -ignpar -parmrk
 oflags: opost onlcr -ocrnl tab3 -onocr -onlret
 cflags: cread cs8 parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow
 -dtrflow -mdmbuf
 cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = undef;
 eol2 = undef; erase = ^H; erase2 = ^H; intr = ^C; kill = ^U;
 lnext = ^V; min = 1; quit = ^\; reprint = ^R; start = ^Q;
 status = ^T; stop = ^S; susp = ^Z; time = 0; werase = ^W;

 And:

 % echo $TERM
 cons25l1
 % stty -a
 speed 9600 baud; 25 rows; 80 columns;
 lflags: icanon isig iexten echo echoe -echok echoke -echonl echoctl
 -echoprt -altwerase -noflsh -tostop -flusho -pendin -nokerninfo
 -extproc
 iflags: -istrip icrnl -inlcr -igncr ixon -ixoff ixany imaxbel -ignbrk
 brkint -inpck -ignpar -parmrk
 oflags: opost onlcr -ocrnl tab0 -onocr -onlret
 cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow
 -dtrflow -mdmbuf
 cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = undef;
 eol2 = undef; erase = ^H; erase2 = ^H; intr = ^C; kill = ^U;
 lnext = ^V; min = 1; quit = ^\; reprint = ^R; start = ^Q;
 status = ^T; stop = ^S; susp = ^Z; time = 0; werase = ^W;

 If you want the system's C shell to treat ^? (delete) as
 it should be treated (perform delete instead of backspace
 or nothing), add those to your .cshrc:

 bindkey ^? delete-char  # for console
 bindkey ^[[3~ delete-char   # for xterm

 Note that this only affects the C shell.



 --
 Polytropon
 Magdeburg, Germany
 Happy FreeBSD user since 4.0
 Andra moi ennepe, Mousa, ...

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: backspace shows ^? in serial communications

2013-02-06 Thread Robert Bonomi
 From owner-freebsd-questi...@freebsd.org  Wed Feb  6 00:19:04 2013
 Date: Wed, 6 Feb 2013 09:44:37 +0330
 Subject: backspace shows ^? in serial communications
 From: s m sam.gh1...@gmail.com
 To: freebsd-questions freebsd-questions@freebsd.org

 hi all

 i have a problem with backspace in serial communications. i have a
 freebsd8.2 box with a serial card on it. when i connect to other freebsd
 box via serial port backspace does not act as i expected. backspace shows
 ^? on screen. i searched alot and find out that stty has two parameters
 -erase and erase2- to identify erase characters in terminal and they should
 be set correctly. i set erase and erase2 to ^? by stty erase \^? and
 stty erase2 \^? commands but nothing happened.
 please let me know how i can fix it. i know it is simple issue but i really
 do not know how to do that.

  stty erase {press the backspace key}

Then hit the enter/return key
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: backspace shows ^? in serial communications

2013-02-05 Thread Polytropon
On Wed, 6 Feb 2013 09:44:37 +0330, s m wrote:
 hi all
 
 i have a problem with backspace in serial communications. i have a
 freebsd8.2 box with a serial card on it. when i connect to other freebsd
 box via serial port backspace does not act as i expected. backspace shows
 ^? on screen. i searched alot and find out that stty has two parameters
 -erase and erase2- to identify erase characters in terminal and they should
 be set correctly. i set erase and erase2 to ^? by stty erase \^? and
 stty erase2 \^? commands but nothing happened.
 please let me know how i can fix it. i know it is simple issue but i really
 do not know how to do that.

If I remember correctly, ^? is delete, ^H is backspace. You
should check your terminal emulator if it outputs ^? instead
of ^H when you press the backspace key.

FreeBSD's default configuration handles keys correctly (if
you have the proper terminal emulation set, e. g. vt100 or
vt220 for your serial line), so there's probably something
wrong with the settings of the terminal program you're using.

For comparison:

% echo $TERM
xterm
% stty -a
speed 9600 baud; 24 rows; 80 columns;
lflags: icanon isig iexten echo echoe echok echoke -echonl echoctl
-echoprt -altwerase -noflsh -tostop -flusho -pendin -nokerninfo
-extproc
iflags: -istrip icrnl -inlcr -igncr ixon -ixoff -ixany -imaxbel -ignbrk
-brkint -inpck -ignpar -parmrk
oflags: opost onlcr -ocrnl tab3 -onocr -onlret
cflags: cread cs8 parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow
-dtrflow -mdmbuf
cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = undef;
eol2 = undef; erase = ^H; erase2 = ^H; intr = ^C; kill = ^U;
lnext = ^V; min = 1; quit = ^\; reprint = ^R; start = ^Q;
status = ^T; stop = ^S; susp = ^Z; time = 0; werase = ^W;

And:

% echo $TERM
cons25l1
% stty -a
speed 9600 baud; 25 rows; 80 columns;
lflags: icanon isig iexten echo echoe -echok echoke -echonl echoctl
-echoprt -altwerase -noflsh -tostop -flusho -pendin -nokerninfo
-extproc
iflags: -istrip icrnl -inlcr -igncr ixon -ixoff ixany imaxbel -ignbrk
brkint -inpck -ignpar -parmrk
oflags: opost onlcr -ocrnl tab0 -onocr -onlret
cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow
-dtrflow -mdmbuf
cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = undef;
eol2 = undef; erase = ^H; erase2 = ^H; intr = ^C; kill = ^U;
lnext = ^V; min = 1; quit = ^\; reprint = ^R; start = ^Q;
status = ^T; stop = ^S; susp = ^Z; time = 0; werase = ^W;

If you want the system's C shell to treat ^? (delete) as
it should be treated (perform delete instead of backspace
or nothing), add those to your .cshrc:

bindkey ^? delete-char  # for console
bindkey ^[[3~ delete-char   # for xterm

Note that this only affects the C shell.



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: backspace-key and ^H when ssh -X remote.

2009-05-23 Thread Thomas Dickey
On Fri, May 22, 2009 at 11:04:05PM -0700, Gary Kline wrote:
 guys,
 
 here's a bug with how the backspace key doesn't work across computers.
 i'm not sure if there were troubles going from FBSD to FBSD, but there is
 when i ssh from my ubuntu platform to my main desktop.  i do this to edit
 files or for replying to mutt mail using vi.
 
 going from ethos [ubuntu] to tao [fbsd] and using vi, the backspace key
 is translated to \177 and is echoed as ^?.  it does not erase.  i have
 to type 
 
 % stty erase ^V [backspacekey]
 
 to fix this problem. otherwise, to erase a character, i have to type a
 control-H. it is exact the same problem going from fbsd to ubunto. 
 has anybody seen this before?

probably (outside of Linux and a few special cases such as Cygwin,
everyone else uses ^H for backspace - all of the BSD's and all
of the vendor Unix's).

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net


pgpp0vuivOg8X.pgp
Description: PGP signature


Re: backspace-key and ^H when ssh -X remote.

2009-05-23 Thread Polytropon
On Sat, 23 May 2009 06:35:56 -0400, Thomas Dickey dic...@radix.net wrote:
 probably (outside of Linux and a few special cases such as Cygwin,
 everyone else uses ^H for backspace - all of the BSD's and all
 of the vendor Unix's).

As far as I know, ^? indicates the delete key... Maybe the
delete key does ^H in this setting?



-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: backspace-key and ^H when ssh -X remote.

2009-05-23 Thread Thomas Dickey
On Sat, May 23, 2009 at 03:03:00PM +0200, Polytropon wrote:
 On Sat, 23 May 2009 06:35:56 -0400, Thomas Dickey dic...@radix.net wrote:
  probably (outside of Linux and a few special cases such as Cygwin,
  everyone else uses ^H for backspace - all of the BSD's and all
  of the vendor Unix's).
 
 As far as I know, ^? indicates the delete key... Maybe the
 delete key does ^H in this setting?

By uses ^H for backspace, I was referring to the terminal emulators
such as xterm which can be initialized to send either ^H or ^? for
the backspace key, as well as the console terminals which generally
send one or the other...

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net


pgpKRZb50F0PD.pgp
Description: PGP signature


Re: backspace-key and ^H when ssh -X remote.

2009-05-23 Thread Gary Kline
On Sat, May 23, 2009 at 12:25:50PM -0400, Thomas Dickey wrote:
 On Sat, May 23, 2009 at 03:03:00PM +0200, Polytropon wrote:
  On Sat, 23 May 2009 06:35:56 -0400, Thomas Dickey dic...@radix.net wrote:
   probably (outside of Linux and a few special cases such as Cygwin,
   everyone else uses ^H for backspace - all of the BSD's and all
   of the vendor Unix's).
  
  As far as I know, ^? indicates the delete key... Maybe the
  delete key does ^H in this setting?
 
 By uses ^H for backspace, I was referring to the terminal emulators
 such as xterm which can be initialized to send either ^H or ^? for
 the backspace key, as well as the console terminals which generally
 send one or the other...
 

Problem solved.  I didn't expect anyone else to have this bug,
but then I googled and found that on ubuntu linux I had to set my
Keybord to Solaris; it had been set to Linux.  I use the kde
Konsole emulator on both desktop. The Keyboard setting of
freebsd console works fine here on FBSD.

'Strange-but-true' 


 -- 
 Thomas E. Dickey
 http://invisible-island.net
 ftp://invisible-island.net



-- 
 Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
http://jottings.thought.org   http://transfinite.thought.org
The 4.91a release of Jottings: http://jottings.thought.org/index.php

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Backspace Key Not Working

2008-08-02 Thread Michael P. Soulier
On 26/07/08 Schiz0 said:

 Hey,
 
 I have an annoying problem that I'm not sure how to solve. Here's my setup:
 
 PuTTy = My FreeBSD 6.2 box = Production FreeBSD 7.0 box
 
 All via SSH, of course. Now, on my FreeBSD 6.2 box, the backspace key
 works fine all the time. However, when I connect from my 6.2 box into
 the production 7.0 box, the backspace key does not work all the time.
 In the console, it works fine (as in, it deletes what I type).
 However, when I'm in programs such as VIM, it displays ^? instead of
 deleting. Is there a way to fix this?

Does it work in the terminal?

Lets see 

stty -a

in the shell. 

Also see

:h fixdel

in Vim. 

Mike
-- 
Michael P. Soulier [EMAIL PROTECTED]
Any intelligent fool can make things bigger and more complex... It
takes a touch of genius - and a lot of courage to move in the opposite
direction. --Albert Einstein


signature.asc
Description: Digital signature


Re: Backspace Key Not Working

2008-07-26 Thread Sahil Tandon
Schiz0 [EMAIL PROTECTED] wrote:

 I have an annoying problem that I'm not sure how to solve. Here's my setup:
 
 PuTTy = My FreeBSD 6.2 box = Production FreeBSD 7.0 box
 
 All via SSH, of course. Now, on my FreeBSD 6.2 box, the backspace key
 works fine all the time. However, when I connect from my 6.2 box into
 the production 7.0 box, the backspace key does not work all the time.
 In the console, it works fine (as in, it deletes what I type).
 However, when I'm in programs such as VIM, it displays ^? instead of
 deleting. Is there a way to fix this?

What are the contents of .vimrc on the 7.0 machine?  And how have you set 
your TERM environment variable on that machine?  Does anything change if you 
connect directly to your 7.0 box without going through 6.2 in between?

-- 
Sahil Tandon [EMAIL PROTECTED]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Backspace Key Not Working

2008-07-26 Thread Schiz0
.vimrc on the 7.0 box:
---
set autoindent
set background=dark
set backspace=indent,eol,start
set cmdheight=2
set ignorecase
set number
set numberwidth=2
set report=0
set restorescreen=on
set ruler
set scrolloff=3
set showbreak=++
set showmatch
set showmode
set showtabline=3
set smartcase
set smartindent
set smarttab
syntax on
set visualbell
set ff=unix
---

I haven't manually set $TERM to anything, however I am running this
inside screen (using UTF-8 encoding). So screen automatically sets
$TERM to screen.

I just checked, and if I connect directly to the 7.0 box using PuTTy,
the backspace key works fine all the time.

Thanks for the quick reply.

On Sat, Jul 26, 2008 at 11:55 AM, Sahil Tandon [EMAIL PROTECTED] wrote:
 Schiz0 [EMAIL PROTECTED] wrote:

 I have an annoying problem that I'm not sure how to solve. Here's my setup:

 PuTTy = My FreeBSD 6.2 box = Production FreeBSD 7.0 box

 All via SSH, of course. Now, on my FreeBSD 6.2 box, the backspace key
 works fine all the time. However, when I connect from my 6.2 box into
 the production 7.0 box, the backspace key does not work all the time.
 In the console, it works fine (as in, it deletes what I type).
 However, when I'm in programs such as VIM, it displays ^? instead of
 deleting. Is there a way to fix this?

 What are the contents of .vimrc on the 7.0 machine?  And how have you set
 your TERM environment variable on that machine?  Does anything change if you
 connect directly to your 7.0 box without going through 6.2 in between?

 --
 Sahil Tandon [EMAIL PROTECTED]

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Backspace

2007-08-17 Thread Christopher Hilton

d.Z. wrote:

Thanks for helping everybody.

But actually I'm using Bourne shell on FreeBSD 6.1 just like the
Solaris in lab, and the FreeBSD is freshly installed, I have checked
.shrc and .profile, but nothing related to key bindings or stty's
there, so what I thought it should be is:

after I login - [press backspace] - ^H appears - [press DEL] - ^? appears
in emacs - [press backspace] - oops, help appears



stty can translate a small set of keystrokes into functions and gets 
used by the shell. In stty you can set the erase character to Ctrl-H. 
The shell uses the stty definitions for the keys.


For historical reasons emacs uses it's own keybindings and they don't 
work well with the default keystrokes emitted by the syscons driver in 
FreeBSD. In particular emacs want's Ctrl-H to start the help system, H 
for help... But, CTRL-H is also the default ASCII code sent by the 
Backspace key. That's why backspace works fine in your shell and brings 
up help in emacs. There are at least three solutions to this problem.


In the distant past some old terminals sent the ASCII code DEL (^? , or 
0x7f) when the backspace key was pressed. Most modern terminals and 
terminal emulators can be setup to have this behaviour. In this case you 
can have stty use ^? as your erase character and have emacs respond to 
DEL by deleting the character before the point in the buffer. Then you 
can have FreeBSD send DEL when you press backspace by changing the keymap.


 $ man syscons
 $ man 1 kbdmap
 $ man 5 kbdmap
 $ ls -l /usr/share/syscons/keymaps | grep emacs

To make the change permanent you would modify /etc/rc.conf

 $ grep keymap /etc/defaults/rc.conf

will show you the variable you need to change.

Disclaimer: I've never done it this way.

Another method which involves changing the function of ^H in emacs but 
that makes it difficult to get the help system going. A short search of 
google for emacs ^h backspace will probably yield fruit. I used to do 
it this way and it was okay. I t really depends on how much you need the 
help system.


As a long time Gnu Emacs users I can say that the best way to solve this 
problem is to an X11 aware emacs under X-Windows. In this state emacs 
completely bypasses the terminal, catching and interpreting the 
keystroke events from the X window system. Since X can say 'The user 
pressed KeyBackspace which has an ASCII code of 0x08 (Ctrl-H)' emacs 
can see that as a Backspace attempt and delete the appropriate 
character. Further more X can differentiate that keypress from The user 
pressed 'H' while holding down Ctrl which gives an ASCII code of 0x08. 
Emacs gets complete information from the X-Windows system and can take 
the right action, starting the help system.


-- Chris

--
  __o  All I was doing was trying to get home from work.
_`\,_   -Rosa Parks
___(*)/_(*)___
Christopher Sean Hiltonchris | at | vindaloo.com
pgp key: D0957A2D/f5 30 0a e1 55 76 9b 1f 47 0b 07 e9 75 0e 14
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Backspace

2007-08-13 Thread d . Z .
Thanks for helping everybody.

But actually I'm using Bourne shell on FreeBSD 6.1 just like the
Solaris in lab, and the FreeBSD is freshly installed, I have checked
.shrc and .profile, but nothing related to key bindings or stty's
there, so what I thought it should be is:

after I login - [press backspace] - ^H appears - [press DEL] - ^? appears
in emacs - [press backspace] - oops, help appears

I think Solaris was just like the above. But in my FreeBSD, things go like:

after I login - [press backspace will erase last char] - [press DEL
does the same thing]
no matter what have I done to stty like stty erase ^H and stty
erase2 ^H, the result is just the same, backspace and DEL still can
be used to erase last char in shell. The only difference is in emacs,
but I searched the net and found that emacs relies on its own
definition of key bindings in ~/.emacs file (it is empty in this
case), rather than the terminal key bindings. Totally confused.

Any idea? Thanks again for you kind people.

2007/8/13, Jerry McAllister [EMAIL PROTECTED]:
 On Sun, Aug 12, 2007 at 01:31:36PM -0500, Derek Ragona wrote:

  At 10:54 PM 8/11/2007, d.Z. wrote:
  Hello,
  
  I'm a new user to FreeBSD and Unix. I used Solaris 10 last week in
  lab, and found there is a difference between them.
  
  When Solaris is installed, press backspace will give you ^H, you'll
  have to stty erase ^H to solve this problem. But with FreeBSD 6.1,
  when first installed, backspace is always bounded to erase last
  character, even I have stty erase ^? and stty erase2 ^?, backspace
  still deletes last character input. Does any body know why is this
  happening?
 
  Solaris by default uses csh for user accounts.  The backspace key
  assignment and for that matter, all key assignments are dependent on the
  both the shell and terminal definition.  Reassigning keys is typical for
  your shell's startup profile file .cshrc for csh and .bashrc for bash.
 
 
  And strange thing is with default setting (before stty erase and
  erase2 to ^?), when I use Emacs, C-h will give me back space, instead
  of help. I know this is desirable for experts, but I'm really new so
  just want to follow the instruction first.
 
  Applications like the shell you use interpret the terminal definition and
  may or may not use the same key assignments.  Most applications like the
  shells in UNIX environments have startup files to customize the key
  assignments and in the case of editors even define macros.

 And those startup files are:

For csh and tcsh  (tcsh is the most common one in FreeBSD)
the startup file is .cshrc  in one's home directory.  You can also
create a system-wide one.

For SH and bash it is .profile  and for them don't forget to export
any variables.

 jerry

 
  Hope this helps.
 
  -Derek
 
  --
  This message has been scanned for viruses and
  dangerous content by MailScanner, and is
  believed to be clean.
  MailScanner thanks transtec Computers for their support.
 
  ___
  freebsd-questions@freebsd.org mailing list
  http://lists.freebsd.org/mailman/listinfo/freebsd-questions
  To unsubscribe, send any mail to [EMAIL PROTECTED]

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Backspace

2007-08-13 Thread Derek Ragona

At 01:45 AM 8/13/2007, d.Z. wrote:

Thanks for helping everybody.

But actually I'm using Bourne shell on FreeBSD 6.1 just like the
Solaris in lab, and the FreeBSD is freshly installed, I have checked
.shrc and .profile, but nothing related to key bindings or stty's
there, so what I thought it should be is:

after I login - [press backspace] - ^H appears - [press DEL] - ^? appears
in emacs - [press backspace] - oops, help appears

I think Solaris was just like the above. But in my FreeBSD, things go like:

after I login - [press backspace will erase last char] - [press DEL
does the same thing]
no matter what have I done to stty like stty erase ^H and stty
erase2 ^H, the result is just the same, backspace and DEL still can
be used to erase last char in shell. The only difference is in emacs,
but I searched the net and found that emacs relies on its own
definition of key bindings in ~/.emacs file (it is empty in this
case), rather than the terminal key bindings. Totally confused.

Any idea? Thanks again for you kind people.


Programs like emacs generally use terminfo and termcap databases that 
define keys and other terminal capabilities.  Generally these are different 
between various UNIX's.  You can learn more by just doing a man on these:

man terminfo
man termcap

-Derek



2007/8/13, Jerry McAllister [EMAIL PROTECTED]:
 On Sun, Aug 12, 2007 at 01:31:36PM -0500, Derek Ragona wrote:

  At 10:54 PM 8/11/2007, d.Z. wrote:
  Hello,
  
  I'm a new user to FreeBSD and Unix. I used Solaris 10 last week in
  lab, and found there is a difference between them.
  
  When Solaris is installed, press backspace will give you ^H, you'll
  have to stty erase ^H to solve this problem. But with FreeBSD 6.1,
  when first installed, backspace is always bounded to erase last
  character, even I have stty erase ^? and stty erase2 ^?, backspace
  still deletes last character input. Does any body know why is this
  happening?
 
  Solaris by default uses csh for user accounts.  The backspace key
  assignment and for that matter, all key assignments are dependent on the
  both the shell and terminal definition.  Reassigning keys is typical for
  your shell's startup profile file .cshrc for csh and .bashrc for bash.
 
 
  And strange thing is with default setting (before stty erase and
  erase2 to ^?), when I use Emacs, C-h will give me back space, instead
  of help. I know this is desirable for experts, but I'm really new so
  just want to follow the instruction first.
 
  Applications like the shell you use interpret the terminal definition and
  may or may not use the same key assignments.  Most applications like the
  shells in UNIX environments have startup files to customize the key
  assignments and in the case of editors even define macros.

 And those startup files are:

For csh and tcsh  (tcsh is the most common one in FreeBSD)
the startup file is .cshrc  in one's home directory.  You can also
create a system-wide one.

For SH and bash it is .profile  and for them don't forget to export
any variables.

 jerry

 
  Hope this helps.
 
  -Derek
 
  --
  This message has been scanned for viruses and
  dangerous content by MailScanner, and is
  believed to be clean.
  MailScanner thanks transtec Computers for their support.
 
  ___
  freebsd-questions@freebsd.org mailing list
  http://lists.freebsd.org/mailman/listinfo/freebsd-questions
  To unsubscribe, send any mail to 
[EMAIL PROTECTED]


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Backspace

2007-08-12 Thread Derek Ragona

At 10:54 PM 8/11/2007, d.Z. wrote:

Hello,

I'm a new user to FreeBSD and Unix. I used Solaris 10 last week in
lab, and found there is a difference between them.

When Solaris is installed, press backspace will give you ^H, you'll
have to stty erase ^H to solve this problem. But with FreeBSD 6.1,
when first installed, backspace is always bounded to erase last
character, even I have stty erase ^? and stty erase2 ^?, backspace
still deletes last character input. Does any body know why is this
happening?


Solaris by default uses csh for user accounts.  The backspace key 
assignment and for that matter, all key assignments are dependent on the 
both the shell and terminal definition.  Reassigning keys is typical for 
your shell's startup profile file .cshrc for csh and .bashrc for bash.




And strange thing is with default setting (before stty erase and
erase2 to ^?), when I use Emacs, C-h will give me back space, instead
of help. I know this is desirable for experts, but I'm really new so
just want to follow the instruction first.


Applications like the shell you use interpret the terminal definition and 
may or may not use the same key assignments.  Most applications like the 
shells in UNIX environments have startup files to customize the key 
assignments and in the case of editors even define macros.


Hope this helps.

-Derek

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Backspace

2007-08-12 Thread Dick Hoogendijk
Derek Ragona [EMAIL PROTECTED] writes:

 Solaris by default uses csh for user accounts.

What kind of information is this?
Solaris does _not_ use csh. Not for root and not for user accounts.
Both use 'sh' This is for solaris 10
The developers and community editions use bash for their user logins.
I change that into ksh or zsh myself ;-)

-- 
Dick Hoogendijk -- PGP/GnuPG key: 01D2433D
++ http://nagual.nl/ + Solaris 11 05/07 ++
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Backspace

2007-08-12 Thread Jerry McAllister
On Sun, Aug 12, 2007 at 01:31:36PM -0500, Derek Ragona wrote:

 At 10:54 PM 8/11/2007, d.Z. wrote:
 Hello,
 
 I'm a new user to FreeBSD and Unix. I used Solaris 10 last week in
 lab, and found there is a difference between them.
 
 When Solaris is installed, press backspace will give you ^H, you'll
 have to stty erase ^H to solve this problem. But with FreeBSD 6.1,
 when first installed, backspace is always bounded to erase last
 character, even I have stty erase ^? and stty erase2 ^?, backspace
 still deletes last character input. Does any body know why is this
 happening?
 
 Solaris by default uses csh for user accounts.  The backspace key 
 assignment and for that matter, all key assignments are dependent on the 
 both the shell and terminal definition.  Reassigning keys is typical for 
 your shell's startup profile file .cshrc for csh and .bashrc for bash.
 
 
 And strange thing is with default setting (before stty erase and
 erase2 to ^?), when I use Emacs, C-h will give me back space, instead
 of help. I know this is desirable for experts, but I'm really new so
 just want to follow the instruction first.
 
 Applications like the shell you use interpret the terminal definition and 
 may or may not use the same key assignments.  Most applications like the 
 shells in UNIX environments have startup files to customize the key 
 assignments and in the case of editors even define macros.

And those startup files are:

   For csh and tcsh  (tcsh is the most common one in FreeBSD)  
   the startup file is .cshrc  in one's home directory.  You can also
   create a system-wide one.

   For SH and bash it is .profile  and for them don't forget to export
   any variables.

jerry

 
 Hope this helps.
 
 -Derek
 
 -- 
 This message has been scanned for viruses and
 dangerous content by MailScanner, and is
 believed to be clean.
 MailScanner thanks transtec Computers for their support.
 
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Backspace problems

2007-06-12 Thread Jerry McAllister

 
 Scott Mayo wrote:
 
 If I hit backspace it just backs up on the line until
 were input-mode 
 was started during this input-mode session.  If I hit
 delete then it 
 capitalizes the charcter behind the cursor and throws
 me into 
 command-mode.

You just need to get it configured right.  For some things
I need to do something like CTRL-BACKSPACE instead of regular
BACKSPACE or other variations in certain circumstances.  But,
I get what I need with the defaults (nothing special), so I
haven't bothered to learn the keyboard config and vi config, etc
stuff, but it is there and people make them do whatever they 
want.If you really want, you can make it remap however
you want.   But, you will probably have to do some research
on keyboard remapping and vi, and command line config, etc.

jerry

 
 
 ===
 This way to get things to delete in vi seems odd to
 me.
 I have always used 'x' to delete from the right, and
 X to delete from the left. Maybe some hacks of vi
 include alternative methods to navigate. The problem
 with learning a method using shortcuts is that the
 pure method becomes unnatural and difficult. vi
 becomes real useful once you start doing things in it
 by reflex. If your reflexes are of the pure method
 then you should be good from one vi to the next. Even
 in my case, using the arrow keys seems more natural
 for jumping around (than using the jkl and ; keys).
 This is even more true for me since I use the Dvorak
 keyboard layoun and j, k, l and ; are not close
 together (well, j and k are -- and l and ; are too;
 but still not quick or easy to use for navigation.)
 
 Maybe the vim port in the ports collection will bring
 you completeness in your OS experience.
 
 ==
 Because sentence against an evil deed is not executed speedily, the human 
 heart is fully set to do evil.
 Ecclesiastes 8:11
 
 

 
 Be a better Globetrotter. Get better travel answers from someone who knows. 
 Yahoo! Answers - Check it out.
 http://answers.yahoo.com/dir/?link=listsid=396545469
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]
 
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Backspace problems

2007-06-12 Thread Scott Mayo

doug wrote:

On Mon, 11 Jun 2007, Scott Mayo wrote:

I am not on any VI list, but thought I would post this here to see if 
anyone had any ideas.


This is my first FreeBSD server, so I am still learning.

I got my backspace and delete working the shell after a few 
adjustments, but they still act odd in VI.  I have checked setting 
with my linux boxes (the backspace and delete work fine there) and 
everything looks the same.  I did an stty -a | grep erase and it tells 
me that erase is Contral-? and erase2 is control-H.  I have changed 
both around to make them either Ctrl-? or Ctrl-H, but that has not 
helped.


If I hit backspace it just backs up on the line until were input-mode 
was started during this input-mode session.  If I hit delete then it 
capitalizes the charcter behind the cursor and throws me into 
command-mode.


I am not sure if there are anymore settings to change in FreeBSD or if 
it is a setting in VI.


Any help would greatly be appreciated.


Scott, my stty -a:

cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = undef;
eol2 = undef; erase = ^H; erase2 = ^@; intr = ^C; kill = ^U;
lnext = ^V; min = 1; quit = ^\; reprint = ^R; start = ^Q;
status = ^T; stop = ^S; susp = ^Z; time = 0; werase = ^W;

IMO redefining keys is not a good thing if you are learning UNIX and vi. 
In the default setup (I use tcsh for an interactive shell) ctrl-h is a 
backspace and functions on the command line like the backspace key, 
i.e., deletes the char to the left of the cursor. In vi the delete-key 
== x in command mode (by default). The [del] key does not work on the 
command line.


I would advise getting comfortable with the default settings before 
branching out. Key bindings and /etc/termcap changes have lots of 
ramifications. vi is as it is because it was written when systems were 
line oriented. The 'hjkl' are where your fingers sit if you are a touch 
typist, and hence were chosen for that purpose. As late as 1995 vi on 
BSDI (where I start on the BSD trail) did not support the cursor keys 
very well.


I have attached a vi cheat sheet that I found years ago. This is a 
pretty good starter set of commands for vi.


vi is not even as bad as it gets. vi is in /usr/bin so if your system is 
really broken and you must edit something ed is the tool available in 
FreeBSD.





Thanks for the info Doug.  A friend of mine set me on the right path.  I 
have been using vi in linux, except it was not vi.  Vi was aliased to 
vim.  I had installed vim on my FreeBSD server the other day, but that 
did not fix it.  I found out that it has to be run with 'set nocp' so 
that it does not run in vi compatibility mode.


I did this and now my backspace and delete work like I want them to. :)

I appreciate the replies.

--
Scott Mayo
System Administrator
Bloomfield Schools
PH: 573-568-5669
FA: 573-568-4565
Pager: 800-264-2535 X2549

Duct tape is like the force, it has a light side and a dark side and it
holds the universe together.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Backspace problems

2007-06-12 Thread Lars Kristiansen
Thanks for the info Doug.  A friend of mine set me on the right path.  I 
have been using vi in linux, except it was not vi.  Vi was aliased to 
vim.  I had installed vim on my FreeBSD server the other day, but that 
did not fix it.  I found out that it has to be run with 'set nocp' so 
that it does not run in vi compatibility mode.


I did this and now my backspace and delete work like I want them to. :)

I appreciate the replies.


For vim, my favorite is this:
cp /usr/local/share/vim/vim70/vimrc_example.vim ~/.vimrc


Regards,
 Lars
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: Backspace problems

2007-06-11 Thread Neil Short

Scott Mayo wrote:

If I hit backspace it just backs up on the line until
were input-mode 
was started during this input-mode session.  If I hit
delete then it 
capitalizes the charcter behind the cursor and throws
me into 
command-mode.


===
This way to get things to delete in vi seems odd to
me.
I have always used 'x' to delete from the right, and
X to delete from the left. Maybe some hacks of vi
include alternative methods to navigate. The problem
with learning a method using shortcuts is that the
pure method becomes unnatural and difficult. vi
becomes real useful once you start doing things in it
by reflex. If your reflexes are of the pure method
then you should be good from one vi to the next. Even
in my case, using the arrow keys seems more natural
for jumping around (than using the jkl and ; keys).
This is even more true for me since I use the Dvorak
keyboard layoun and j, k, l and ; are not close
together (well, j and k are -- and l and ; are too;
but still not quick or easy to use for navigation.)

Maybe the vim port in the ports collection will bring
you completeness in your OS experience.

==
Because sentence against an evil deed is not executed speedily, the human heart 
is fully set to do evil.
Ecclesiastes 8:11


   

Be a better Globetrotter. Get better travel answers from someone who knows. 
Yahoo! Answers - Check it out.
http://answers.yahoo.com/dir/?link=listsid=396545469
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Backspace key - not mapping to ^H

2007-02-28 Thread Garrett Cooper

Jordan Gordeev wrote:

Gary Kline wrote:

I'm not sure whether this just in Ubuntu or in the Gnome desktop
or what, but for days, when I type mail in vi in mutt, sometimes
I get a ^? when I hit the backspace.  ^H still works to back up
and correct my typos, but that's lots more work that what my
fingers are accustomed to.  It may be when I'm ssh'd across
servers.  I thought I'd ask here before I dig into this.  I think
a new xterm was recently updated in ports; not  sure if tat is a
factor or not.

xev understands that the b'space key is a backspace and tells me
the keycode.  Should I just us xmodmaprc to fix this?  thanks
for any clues!!

gary




See stty(1) and termios(4). You should modify the erase or erase2 values.


The terminal settings available from gnome (if you open up an xterm / 
Gnome terminal shell using the Terminal command under the menu) has 
various options which do the same thing, without touching the stty and 
termios values, while accomplishing properly deletion in your terminal 
window.


-Garrett
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Backspace key - not mapping to ^H

2007-02-28 Thread Thomas Dickey
On Wed, Feb 28, 2007 at 06:33:54AM -0800, Garrett Cooper wrote:
 Jordan Gordeev wrote:
 Gary Kline wrote:
 I'm not sure whether this just in Ubuntu or in the Gnome desktop
...
 servers.  I thought I'd ask here before I dig into this.  I think
 a new xterm was recently updated in ports; not  sure if tat is a
 factor or not.

no (I don't recall making changes in that area).

 See stty(1) and termios(4). You should modify the erase or erase2 values.

reasonable (Ubuntu uses Debian packages iirc, which makes it use DEL,
FreeBSD uses BS for erase, etc).
 
 The terminal settings available from gnome (if you open up an xterm / 
 Gnome terminal shell using the Terminal command under the menu) has 

gnome-terminal isn't xterm (OP isn't making that distinction either).

xterm has menu settings which can change the assignment of BS/DEL to the
backspace key (unlike gnome-terminal, it has a manpage describing these
details ;-).

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net


pgp4lCGMpHXwv.pgp
Description: PGP signature


Re: Backspace key - not mapping to ^H

2007-02-28 Thread Gary Kline
On Wed, Feb 28, 2007 at 03:37:49PM -0500, Thomas Dickey wrote:
 On Wed, Feb 28, 2007 at 06:33:54AM -0800, Garrett Cooper wrote:
  Jordan Gordeev wrote:
  Gary Kline wrote:
  I'm not sure whether this just in Ubuntu or in the Gnome desktop
 ...
  servers.  I thought I'd ask here before I dig into this.  I think
  a new xterm was recently updated in ports; not  sure if tat is a
  factor or not.
 
 no (I don't recall making changes in that area).
 
  See stty(1) and termios(4). You should modify the erase or erase2 values.
 
 reasonable (Ubuntu uses Debian packages iirc, which makes it use DEL,
 FreeBSD uses BS for erase, etc).
  
  The terminal settings available from gnome (if you open up an xterm / 
  Gnome terminal shell using the Terminal command under the menu) has 
 
 gnome-terminal isn't xterm (OP isn't making that distinction either).
 
 xterm has menu settings which can change the assignment of BS/DEL to the
 backspace key (unlike gnome-terminal, it has a manpage describing these
 details ;-).
 


Yeah... reading (and messing with) this new stuff is an
education.

Actually, I was using KDE's Konsole term, not Gnome.   With the
Gnome version of xterm, vi behaves as-usual; with Konsole, nope.
Unless I'm missing some fine print, I didn't see a way of fixing.
stty in Konsole says that things are correct--that backspace = ^H
and so on.  It may be that the child proc doesn't inherit the
stty setting with thr KDE term whereas it does with Gnome's.  
Solution:: go back to Gnome.

If anybody has other ideas, please lemmee know!

gary


 -- 
 Thomas E. Dickey
 http://invisible-island.net
 ftp://invisible-island.net



-- 
  Gary Kline  [EMAIL PROTECTED]   www.thought.org  Public Service Unix

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Backspace key - not mapping to ^H

2007-02-28 Thread youshi10

On Wed, 28 Feb 2007, Thomas Dickey wrote:


On Wed, Feb 28, 2007 at 06:33:54AM -0800, Garrett Cooper wrote:

Jordan Gordeev wrote:

Gary Kline wrote:

   I'm not sure whether this just in Ubuntu or in the Gnome desktop

...

   servers.  I thought I'd ask here before I dig into this.  I think
   a new xterm was recently updated in ports; not  sure if tat is a
   factor or not.


no (I don't recall making changes in that area).


See stty(1) and termios(4). You should modify the erase or erase2 values.


reasonable (Ubuntu uses Debian packages iirc, which makes it use DEL,
FreeBSD uses BS for erase, etc).


The terminal settings available from gnome (if you open up an xterm /
Gnome terminal shell using the Terminal command under the menu) has


gnome-terminal isn't xterm (OP isn't making that distinction either).

xterm has menu settings which can change the assignment of BS/DEL to the
backspace key (unlike gnome-terminal, it has a manpage describing these
details ;-).

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net


You can set the default terminal in gnome to be xterm instead of Gnome Terminal. Gnome 
then wraps xterm in a program they call Terminal which you can setup to your 
liking using the preferences accessible from the menu.

That's what I meant. Just relaying my experience because I had a similar 
problem recently with Suse.

-Garrett

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Backspace key - not mapping to ^H

2007-02-28 Thread Gary Kline
On Wed, Feb 28, 2007 at 03:39:41PM -0800, [EMAIL PROTECTED] wrote:
 On Wed, 28 Feb 2007, Thomas Dickey wrote:
 

[[ yelps of various sorts about STUFF ]]

 
 You can set the default terminal in gnome to be xterm instead of Gnome 
 Terminal. Gnome then wraps xterm in a program they call Terminal which 
 you can setup to your liking using the preferences accessible from the menu.
 
 That's what I meant. Just relaying my experience because I had a similar 
 problem recently with Suse.
 
 -Garrett
 


Too bad there isn't some sort of web database for these sorts of
miscellany with tags like (vi backspace-failure term) that would 
aide the search and solution for these type questions.  This may
be one of Google's aims, but there are miles to go 

gary


 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]

-- 
  Gary Kline  [EMAIL PROTECTED]   www.thought.org  Public Service Unix

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Backspace key - not mapping to ^H

2007-02-28 Thread youshi10

On Wed, 28 Feb 2007, Gary Kline wrote:


On Wed, Feb 28, 2007 at 03:39:41PM -0800, [EMAIL PROTECTED] wrote:

On Wed, 28 Feb 2007, Thomas Dickey wrote:



[[ yelps of various sorts about STUFF ]]



You can set the default terminal in gnome to be xterm instead of Gnome
Terminal. Gnome then wraps xterm in a program they call Terminal which
you can setup to your liking using the preferences accessible from the menu.

That's what I meant. Just relaying my experience because I had a similar
problem recently with Suse.

-Garrett




Too bad there isn't some sort of web database for these sorts of
miscellany with tags like (vi backspace-failure term) that would
aide the search and solution for these type questions.  This may
be one of Google's aims, but there are miles to go

gary


Someone (Chuck Swiger I believe?) posted a modded .Xresources file as a 
solution  to my terminal issue a few weeks back; it modified the behavior of 
Xterm to meet his needs, but it wasn't quite what I wanted/needed though. I 
found the gnome terminal solution, but maybe the solution he provided me would 
be helpful for you?

-Garrett

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Backspace key - not mapping to ^H

2007-02-28 Thread Gary Kline
On Wed, Feb 28, 2007 at 04:06:11PM -0800, [EMAIL PROTECTED] wrote:
 On Wed, 28 Feb 2007, Gary Kline wrote:
 
 On Wed, Feb 28, 2007 at 03:39:41PM -0800, [EMAIL PROTECTED] wrote:
 On Wed, 28 Feb 2007, Thomas Dickey wrote:
 
 
  [[ yelps of various sorts about STUFF ]]
 
 
 You can set the default terminal in gnome to be xterm instead of Gnome
 Terminal. Gnome then wraps xterm in a program they call Terminal which
 you can setup to your liking using the preferences accessible from the 
 menu.
 
 That's what I meant. Just relaying my experience because I had a similar
 problem recently with Suse.
 
 -Garrett
 
 
 
  Too bad there isn't some sort of web database for these sorts of
  miscellany with tags like (vi backspace-failure term) that would
  aide the search and solution for these type questions.  This may
  be one of Google's aims, but there are miles to go
 
  gary
 
 Someone (Chuck Swiger I believe?) posted a modded .Xresources file as a 
 solution  to my terminal issue a few weeks back; it modified the behavior 
 of Xterm to meet his needs, but it wasn't quite what I wanted/needed 
 though. I found the gnome terminal solution, but maybe the solution he 
 provided me would be helpful for you?


Maybe.  Or *hopefully*!  I've got a few lines in my ~/.Xresources
file but haven't touch it in years.  Another thing along this
line involves using FBSD from the boot-up screem--the console.
It's slightly difficult for me to reach ESC so I have both the 
DEL key and the Left Alt key mapped to be ESC.  But only running 
X.  When I'm rebooting or down to single-user and I hit L-Alt 
from vi, Zip.  

What's the magic .key*FOO* file that remaps from the console?
Not to whine Too much, but god, it's been a long century!

gary

 
 -Garrett
 
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]

-- 
  Gary Kline  [EMAIL PROTECTED]   www.thought.org  Public Service Unix

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Backspace key - not mapping to ^H

2007-02-27 Thread Jordan Gordeev

Gary Kline wrote:

I'm not sure whether this just in Ubuntu or in the Gnome desktop
or what, but for days, when I type mail in vi in mutt, sometimes
I get a ^? when I hit the backspace.  ^H still works to back up
and correct my typos, but that's lots more work that what my
fingers are accustomed to.  It may be when I'm ssh'd across
servers.  I thought I'd ask here before I dig into this.  I think
a new xterm was recently updated in ports; not  sure if tat is a
factor or not.

xev understands that the b'space key is a backspace and tells me
the keycode.  Should I just us xmodmaprc to fix this?  thanks
for any clues!!

gary




See stty(1) and termios(4). You should modify the erase or erase2 values.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: backspace and delete keys behavior

2004-08-01 Thread Ion-Mihai Tetcu
On Sun, 1 Aug 2004 12:17:29 +0930
Malcolm Kay [EMAIL PROTECTED] wrote:

  Don't fool with xmodmap; it will work against you in applications -- just 
  bind the key sequence in your shell (tcsh?)
  $  bindkey ^[[3~ delete-char

yey, thanks

-- 
IOnut
Unregistered ;) FreeBSD user

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: backspace and delete keys behavior

2004-07-31 Thread Mark Ovens
Ion-Mihai Tetcu wrote:
On Fri, 30 Jul 2004 14:30:59 +0100
Mark Ovens [EMAIL PROTECTED] wrote:
Peter Ryan wrote:
 I've got the same thing on the 2 machines i am experimenting
 with.  I am new and thought it was a standard feature :) 
 
 I also defined a standard US 101 keyboard.
 
 Makes me think there is a setting or choice at installation that
 deals with this, rather than having to patch something.
 

Add
keysym Delete = 0x04
to ~/.xmodmaprc
and add
xmodmap ~/.xmodmaprc
to ~/.xinitrc
To implement this in a running X session type this in an xterm
xmodmap -e keysym Delete = 0x04
Actually, this is probably a better solution for the OP as it is global 
whereas my previous suggestion is xterm specific.
The only problem is that if you keep the delete key pressed to long it
exits the terminal. At least when xmodmap typed under kde's konsole;
it acts this way both in for konsole and xterm.
Only if the cursor is in the first character position after the prompt 
of course. Not sure what the solution is since Ctrl-D is delete char to 
the right of the cursor and EOT, which exits the shell.

Mark

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: backspace and delete keys behavior

2004-07-31 Thread Giorgos Keramidas
On 2004-07-31 18:43, Mark Ovens [EMAIL PROTECTED] wrote:
Ion-Mihai Tetcu wrote:
On Fri, 30 Jul 2004 14:30:59 +0100 Mark Ovens [EMAIL PROTECTED] wrote:
 To implement this in a running X session type this in an xterm

 xmodmap -e keysym Delete = 0x04

 Actually, this is probably a better solution for the OP as it is
 global whereas my previous suggestion is xterm specific.

 The only problem is that if you keep the delete key pressed to long
 it exits the terminal. At least when xmodmap typed under kde's
 konsole; it acts this way both in for konsole and xterm.

 Only if the cursor is in the first character position after the prompt
 of course. Not sure what the solution is since Ctrl-D is delete char to
 the right of the cursor and EOT, which exits the shell.

There's always some sort of option to ignore EOF's in interactive mode,
like IGNOREEOF=10 in GNU bash, `set ignoreeof=10' in tcsh, or `set -I'
in FreeBSD's sh(1).

Setting this might avoid unexpected shell termination by hitting DEL :)

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: backspace and delete keys behavior

2004-07-31 Thread Malcolm Kay
On Sunday 01 August 2004 03:51, Giorgos Keramidas wrote:
 On 2004-07-31 18:43, Mark Ovens [EMAIL PROTECTED] wrote:
 Ion-Mihai Tetcu wrote:
 On Fri, 30 Jul 2004 14:30:59 +0100 Mark Ovens [EMAIL PROTECTED] wrote:
  To implement this in a running X session type this in an xterm
 
  xmodmap -e keysym Delete = 0x04
 

The default code produced by the Delete key and interpretation by X is fine.
Xterm produces the standard ANSI sequence ^[[3~ as it should and this is 
encoded in termcap for xterm as delete character. And this will work as 
expected for many applications working within an xterm window. The problem 
comes about that the shell does not honour this termcap entry.

Don't fool with xmodmap; it will work against you in applications -- just 
bind the key sequence in your shell (tcsh?)
$  bindkey ^[[3~ delete-char

I guess it would not be too difficult to extract the correct string from
termcap so that it worked for all (most) terminals but most now use the 
standard ANSI sequences so it is probably not worth the effort.

Malcolm



___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: backspace and delete keys behavior

2004-07-30 Thread Kevin D. Kinsey, DaleCo, S.P.
Mariano Guadagnini wrote:
Hi guys, I am new to Freebsd (after years of linux) and, althought system 
installation and configuration was quite seamlessly, I've an issue with the 
delete key of my keyboard (101 keys us layout): In xterm, the backspace key 
works ok, but when I press del, it prints the ~ character, instead of  
deleting .  I have read it has something to do with keyboard layout config, 
but I couldn't find out how to fix it. So, any ideas?

Thanks, (and forgive my poor english)
Mariano Guadagnini
Argentina
 

what does:
echo $TERM
   give you?
It could possibly be the wrong terminal type --- try the following
at the CLI (depending on which shell)...
csh/tcsh:
   $setenv TERM xterm-color
sh/bash:
   #TERM=xterm-color
   #export TERM
HTH,
Kevin Kinsey
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: backspace and delete keys behavior

2004-07-30 Thread Ion-Mihai Tetcu
On Fri, 30 Jul 2004 04:01:53 -0500
Kevin D. Kinsey, DaleCo, S.P. [EMAIL PROTECTED] wrote:

 Mariano Guadagnini wrote:
 
 Hi guys, I am new to Freebsd (after years of linux) and, althought system 
 installation and configuration was quite seamlessly, I've an issue with the 
 delete key of my keyboard (101 keys us layout): In xterm, the backspace key 
 works ok, but when I press del, it prints the ~ character, instead of  
 deleting .  I have read it has something to do with keyboard layout config, 
 but I couldn't find out how to fix it. So, any ideas?
 
 Thanks, (and forgive my poor english)
 
 
 Mariano Guadagnini
 Argentina
   
 
 
 what does:
 
  echo $TERM
 
 give you?
 
 It could possibly be the wrong terminal type --- try the following
 at the CLI (depending on which shell)...
 
 csh/tcsh:
 
 $setenv TERM xterm-color

[EMAIL PROTECTED] /home/itetcu/.dc [12:26:07] 0
 % echo $TERM
xterm
[EMAIL PROTECTED] /home/itetcu/.dc [12:58:58] 0 
% setenv TERM xterm-color
[EMAIL PROTECTED] /home/itetcu/.dc [12:59:11] 0
 % echo $TERM
xterm-color
[EMAIL PROTECTED] /home/itetcu/.dc [12:59:15] 0
 % dasdas

Where the ~ are made by pressing delete.



-- 
IOnut
Unregistered ;) FreeBSD user

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: backspace and delete keys behavior

2004-07-30 Thread Mark Ovens
Mariano Guadagnini wrote:
Hi guys, I am new to Freebsd (after years of linux) and, althought system 
installation and configuration was quite seamlessly, I've an issue with the 
delete key of my keyboard (101 keys us layout): In xterm, the backspace key 
works ok, but when I press del, it prints the ~ character, instead of  
deleting .  I have read it has something to do with keyboard layout config, 
but I couldn't find out how to fix it. So, any ideas?

Thanks, (and forgive my poor english)
Add this to ~/.Xdefaults
XTerm*vt100.translations: #override \n\
   KeyDelete: string(0x04) \n
which maps Ctrl-D to the DEL key, then run
% xrdb  ~/.Xdefaults
to implement it (in the current X session).
Note that this won't change the behaviour in the current xterm, but will 
in any new ones you open.

HTH
Regards,
Mark
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: backspace and delete keys behavior

2004-07-30 Thread Peter Ryan
I've got the same thing on the 2 machines i am experimenting
with.  I am new and thought it was a standard feature :) 

I also defined a standard US 101 keyboard.

Makes me think there is a setting or choice at installation that
deals with this, rather than having to patch something.

I counted my keys - there are 101. It looks as much like
a standard US keyboard as anything else I have.

My XF86Config file section for the keyboard contains
Identifier Keyboard0
Driver keyboard
option XkbModel pc101
option XkbLayout us

Could someone who this does not happen to tell me what
is different in their file.

I am running freeBSD 4.10 RELEASE

Thanks
Peter

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Mark Ovens
 Sent: Friday, July 30, 2004 20:21
 To: Mariano Guadagnini
 Cc: [EMAIL PROTECTED]
 Subject: Re: backspace and delete keys behavior
 
 Mariano Guadagnini wrote:
  Hi guys, I am new to Freebsd (after years of linux) and, althought 
  system installation and configuration was quite seamlessly, I've an 
  issue with the delete key of my keyboard (101 keys us layout): In 
  xterm, the backspace key works ok, but when I press del, it 
 prints the 
  ~ character, instead of deleting .  I have read it has 
 something to 
  do with keyboard layout config, but I couldn't find out how 
 to fix it. So, any ideas?
  
  Thanks, (and forgive my poor english)
  
 
 Add this to ~/.Xdefaults
 
 XTerm*vt100.translations: #override \n\
 KeyDelete: string(0x04) \n
 
 which maps Ctrl-D to the DEL key, then run
 
 % xrdb  ~/.Xdefaults
 
 to implement it (in the current X session).
 
 Note that this won't change the behaviour in the current 
 xterm, but will in any new ones you open.
 
 HTH
 
 Regards,
 
 Mark
 ___
 [EMAIL PROTECTED] mailing list 
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to 
 [EMAIL PROTECTED]
 

 


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: backspace and delete keys behavior

2004-07-30 Thread Mark Ovens
Peter Ryan wrote:
I've got the same thing on the 2 machines i am experimenting
with.  I am new and thought it was a standard feature :) 

I also defined a standard US 101 keyboard.
Makes me think there is a setting or choice at installation that
deals with this, rather than having to patch something.
Add
keysym Delete = 0x04
to ~/.xmodmaprc
and add
xmodmap ~/.xmodmaprc
to ~/.xinitrc
To implement this in a running X session type this in an xterm
xmodmap -e keysym Delete = 0x04
Actually, this is probably a better solution for the OP as it is global 
whereas my previous suggestion is xterm specific.

HTH
Regards,
Mark
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: backspace and delete keys behavior

2004-07-30 Thread Robert Huff

I don't know what shell you're using, but for whatever help it
may be: I have

stty erase '^?'

in my ,cshrc.
My .xinitrc also has this (commented out):

xmodmap -e keysym BackSpace = Delete


Robert Huff

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: backspace and delete keys behavior

2004-07-30 Thread Warren Block
On Fri, 30 Jul 2004, Mariano Guadagnini wrote:
Hi guys, I am new to Freebsd (after years of linux) and, althought system
installation and configuration was quite seamlessly, I've an issue with the
delete key of my keyboard (101 keys us layout): In xterm, the backspace key
works ok, but when I press del, it prints the ~ character, instead of
deleting .  I have read it has something to do with keyboard layout config,
but I couldn't find out how to fix it. So, any ideas?
I use csh/tcsh and just put this in .cshrc:
bindkey ^? delete-char
bindkey \e[3~ delete-char
bindkey \e[1~ beginning-of-line
bindkey \e[4~ end-of-line
Seems to work for console and xterm.  There's a good web page on this:
http://www.ibb.net/~anne/keyboard.html
-Warren Block * Rapid City, South Dakota USA
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: backspace and delete keys behavior

2004-07-30 Thread Ion-Mihai Tetcu
On Fri, 30 Jul 2004 14:30:59 +0100
Mark Ovens [EMAIL PROTECTED] wrote:

 Peter Ryan wrote:
  I've got the same thing on the 2 machines i am experimenting
  with.  I am new and thought it was a standard feature :) 
  
  I also defined a standard US 101 keyboard.
  
  Makes me think there is a setting or choice at installation that
  deals with this, rather than having to patch something.
  
 
 Add
 
 keysym Delete = 0x04
 
 to ~/.xmodmaprc
 
 and add
 
 xmodmap ~/.xmodmaprc
 
 to ~/.xinitrc
 
 To implement this in a running X session type this in an xterm
 
 xmodmap -e keysym Delete = 0x04
 
 Actually, this is probably a better solution for the OP as it is global 
 whereas my previous suggestion is xterm specific.

The only problem is that if you keep the delete key pressed to long it
exits the terminal. At least when xmodmap typed under kde's konsole;
it acts this way both in for konsole and xterm.


-- 
IOnut
Unregistered ;) FreeBSD user

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Backspace key under gnometerminal

2002-12-26 Thread Scott Ballantyne
A couple of weeks ago I wrote:

 How does one get consistant behavior of the backspace key in emacs and
 gnometerm? I've fed xmodmap
 
 remove Lock = Caps_Lock
 remove Control = Control_L
 keysym Control_L = Caps_Lock
 keysym Caps_Lock = Control_L
 add Lock = Caps_Lock
 add Control = Control_L
 keysym BackSpace = Delete
 
 and then
 
 echo XTerm*ttyModes: erase  | xrdb -merge
 
 which has worked for me in other unices and is documented in the
 xmodmap man page for freebsd, but no joy. It doesn't work for xterm
 either :-(
 
 Running 4.7-RELEASE for i386.
 

I received several requests for answers, but no answer. However, the
following seems to work here: Set your xmodmap as shown above but
don't use gnometerm, use xterm (this also helps if you need utmp to be
munged) and incorporate this into your resources db:
XTerm*deleteIsDEL: true

sdb
-- 
[EMAIL PROTECTED]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Re: Backspace and Delete keys under PuTTY

2002-12-15 Thread Adrian Penisoara
Hi,

On Tue, 10 Dec 2002, Ryan Thompson wrote:

 Jonathan Chen wrote to Adrian Penisoara:
 
  On Tue, Dec 10, 2002 at 01:17:17PM +0200, Adrian Penisoara wrote:
 
  [...]
 
 But I have Bash as the default shell. And yes, it works changing
   the Terminal / Keyboard / Backspace key from Contrl-? (127) to
   Control-H, but the users are pissed off by the fact that Linux
   doesn't need this -- does it mean FreeBSD has broken termcap
   entries or that Linux is just stepping on the traditional
   standards ?
 
  It's Linux that's stepping on standards. Their default config is to
  have erase=DEL. All other UNIX boxen I've used have erase=BACKASPCE.
  I suspect the PUTTY writers have been heavily influenced by Linux.
 

 Here's the explanation from the PuTTY's web documentation page[1]:

-
4.4.1 Changing the action of the Backspace key
Some terminals believe that the Backspace key should send the same thing
to the server as Control-H (ASCII code 8). Other terminals believe that
the Backspace key should send ASCII code 127 (usually known as
Control-?) so that it can be distinguished from Control-H. This option
allows you to choose which code PuTTY generates when you press
Backspace.

If you are connecting to a Unix system, you will probably find that the
Unix stty command lets you configure which the server expects to see, so
you might not need to change which one PuTTY generates. On other
systems, the server's expectation might be fixed and you might have no
choice but to configure PuTTY.

If you do have the choice, we recommend configuring PuTTY to generate
Control-? and configuring the server to expect it, because that allows
applications such as emacs to use Control-H for help.
--

  Should all people go for this ?


 Has anyone taken the time to really fine tune PuTTY's settings to work
 well with FreeBSD and {n}curses apps? Somewhat ironically, the best
 results I have received thus far are to use xterm-color and ^H for
 erase. This works perfectly in tcsh/bash, but suffers somewhat in
 curses or ncurses programs such as PINE or lpe. Results with these
 settings vary depending on the application. PINE, for example, screams
 Unknown Command when I try to use Home/End/Delete/ PgUp/PgDn. With
 lpe, everything works except Home/End. Let me tell you, on a Dvorak
 keyboard, the usual ^Q and ^R aren't exactly intuitive or convenient.
 :-)


 Once again, let's see PuTTY's sideview on their site[1]:

-
4.4.2 Changing the action of the Home and End keys
The Unix terminal emulator rxvt disagrees with the rest of the world
about what character sequences should be sent to the server by the Home
and End keys.

xterm, and other terminals, send ESC [1~ for the Home key, and ESC [4~
for the End key. rxvt sends ESC [H for the Home key and ESC [Ow for the
End key.

If you find an application on which the Home and End keys aren't
working, you could try switching this option to see if it helps.


  On which side are we on ?

  And for this matter let's see how the F? keys are standing on:


4.4.3 Changing the action of the function keys and keypad
This option affects the function keys (F1 to F12) and the top row of the
numeric keypad.

In the default mode, labelled ESC [n~, the function keys generate
sequences like ESC [11~, ESC [12~ and so on. This matches the general
behaviour of Digital's terminals.
In Linux mode, F6 to F12 behave just like the default mode, but F1 to F5
generate ESC [[A through to ESC [[E. This mimics the Linux virtual
console.
In Xterm R6 mode, F5 to F12 behave like the default mode, but F1 to F4
generate ESC OP through to ESC OS, which are the sequences produced by
the top row of the keypad on Digital's terminals.
In VT400 mode, all the function keys behave like the default mode, but
the actual top row of the numeric keypad generates ESC OP through to ESC
OS.
In VT100+ mode, the function keys generate ESC OP through to ESC O[
In SCO mode, the function keys F1 to F12 generate ESC [M through to ESC
[X. Together with shift, they generate ESC [Y through to ESC [j. With
control they generate ESC [k through to ESC [v, and with shift and
control together they generate ESC [w through to ESC [{.

If you don't know what any of this means, you probably don't need to
fiddle with it.


  I know that I had problems with F10 in Midnight Commander in FreeBSD 
connected through PuTTY...

[1] http://www.chiark.greenend.org.uk/~sgtatham/putty/docs.html


 Ady (@freebsd.ady.ro)

| An age is called Dark not because the light fails to shine, but  |
| 

Re: Backspace and Delete keys under PuTTY

2002-12-11 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2002-12-11 11:04:09 +0200:
 On 2002-12-11 10:52, JacobRhoden [EMAIL PROTECTED] wrote:
  (Oh, and if you were writing an ssh client, would you default the
  settings to the standard, or to what works on all your machines
  *grin*)
 
 Neither.  I'd make it easy to configure the client differently,
 instead :-)

putty fits that bill, it just *defaults* to the linux behavior, and
I believe that's what mr. JacobRhoden meant.

the OP didn't want to have to do those two more clicks when saving
settings for a *BSD box.

-- 
If you cc me or remove the list(s) completely I'll most likely ignore
your message.see http://www.eyrie.org./~eagle/faqs/questions.html

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Re: Backspace and Delete keys under PuTTY

2002-12-10 Thread Marcel Stangenberger
On Tue, 10 Dec 2002, Adrian Penisoara wrote:

   What is the proper solution ? I'd rather prefer to modify the termcaps
 than making adjustments in PuTTY, as some persons get cranky when it
 comes about changing PuTTY settings while Linux works well with the
 defaults.


proper way is to alter the putty settings for your connection to freebsd
machines. Another way is changing the default shell to bash.

Marcel


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Re: Backspace and Delete keys under PuTTY

2002-12-10 Thread Adrian Penisoara
Hi,

On Tue, 10 Dec 2002, Marcel Stangenberger wrote:

 On Tue, 10 Dec 2002, Adrian Penisoara wrote:
 
What is the proper solution ? I'd rather prefer to modify the termcaps
  than making adjustments in PuTTY, as some persons get cranky when it
  comes about changing PuTTY settings while Linux works well with the
  defaults.
 
 
 proper way is to alter the putty settings for your connection to freebsd
 machines. Another way is changing the default shell to bash.

  But I have Bash as the default shell. And yes, it works changing the
Terminal / Keyboard / Backspace key from Contrl-? (127) to
Control-H, but the users are pissed off by the fact that Linux doesn't
need this -- does it mean FreeBSD has broken termcap entries or that
Linux is just stepping on the traditional standards ?

 Ady (@freebsd.ady.ro)

| An age is called Dark not because the light fails to shine, but  |
| because people refuse to see it. |
|   -- James Michener, Space |




To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Re: Backspace and Delete keys under PuTTY

2002-12-10 Thread Yann Golanski
Quoth Adrian Penisoara on Tue, Dec 10, 2002 at 13:17:17 +0200
   But I have Bash as the default shell. And yes, it works changing the
 Terminal / Keyboard / Backspace key from Contrl-? (127) to
 Control-H, but the users are pissed off by the fact that Linux doesn't
 need this -- does it mean FreeBSD has broken termcap entries or that
 Linux is just stepping on the traditional standards ?

How about just adding this mapping in the global .bashrc and in
.[t]cshrc in your FreeBSD box.  It's not that hard and will be totaly
transparent to your users since thier .*rc file should source the global
one first.

The same things used to happen between terminal on X11 on Linux.  Eterm
was notoriouse for it a few years ago.

-- 
[EMAIL PROTECTED]  -=*=-  www.kierun.org
PGP:   009D 7287 C4A7 FD4F 1680  06E4 F751 7006 9DE2 6318
IRC:   nick kierun, server spod.uk.amiganet.org, channel #sanctus
NNGS:  nick kierun, server nngs.cosmic.org, port 9696.



msg11624/pgp0.pgp
Description: PGP signature


Re: Backspace and Delete keys under PuTTY

2002-12-10 Thread Marcel Stangenberger
On Tue, 10 Dec 2002, Adrian Penisoara wrote:

 Hi,

 On Tue, 10 Dec 2002, Marcel Stangenberger wrote:

  On Tue, 10 Dec 2002, Adrian Penisoara wrote:
 
 What is the proper solution ? I'd rather prefer to modify the termcaps
   than making adjustments in PuTTY, as some persons get cranky when it
   comes about changing PuTTY settings while Linux works well with the
   defaults.
  
 
  proper way is to alter the putty settings for your connection to freebsd
  machines. Another way is changing the default shell to bash.

   But I have Bash as the default shell. And yes, it works changing the
 Terminal / Keyboard / Backspace key from Contrl-? (127) to
 Control-H, but the users are pissed off by the fact that Linux doesn't
 need this -- does it mean FreeBSD has broken termcap entries or that
 Linux is just stepping on the traditional standards ?


Since solaris has the same problem i suspect that linux is stepping
on the standards.

Marcel
--
I have often regretted my speech, never my silence.
- Xenocrates (396-314 B.C.)



To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Re: Backspace and Delete keys under PuTTY

2002-12-10 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2002-12-10 11:59:53 +0200:
  I'm getting pissed (me and some other professors) by the Backspace and
 Delete keystrokes that are incorrectly handled by either PuTTY or
 FreeBSD when connecting to a FreeBSD system from a Windows workstation
 with PuTTY. No need to mention that when it comes to Linux everything
 looks fine.

different terminals use different values for backspace/delete. linux
console uses ^? for backspace, ^[[~3 for delete, while freebsd uses
^H for backspace, and ^? for delete. putty assumes linux, so it
defaults to the codes linux terminal expects.

if you check the xterm definition in /etc/termcap, you'll see
that it defines kb=^H and kD=^?. putty claims to be xterm
(Connection - Terminal type string), so it is the liar here.
 
   What is the proper solution?

IMO: fixing the terminal, in this case: putty.

   I'd rather prefer to modify the termcaps than making adjustments in
   PuTTY, as some persons get cranky when it comes about changing PuTTY
   settings while Linux works well with the defaults.

IIRC this setting is session-wide, so you can have
^? / ^[[~3 for linux, and ^H / ^? for freebsd.

-- 
If you cc me or remove the list(s) completely I'll most likely ignore
your message.see http://www.eyrie.org./~eagle/faqs/questions.html

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Re: Backspace and Delete keys under PuTTY

2002-12-10 Thread Brian
putty on win to freebsd works ok for me, except for bitchx, so I just set
term=vt102 prior to firing up BitchX.  My shell is tcsh.

Brian

- Original Message -
From: Adrian Penisoara [EMAIL PROTECTED]
To: Marcel Stangenberger [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, December 10, 2002 3:17 AM
Subject: Re: Backspace and Delete keys under PuTTY


 Hi,

 On Tue, 10 Dec 2002, Marcel Stangenberger wrote:

  On Tue, 10 Dec 2002, Adrian Penisoara wrote:
 
 What is the proper solution ? I'd rather prefer to modify the
termcaps
   than making adjustments in PuTTY, as some persons get cranky when it
   comes about changing PuTTY settings while Linux works well with the
   defaults.
  
 
  proper way is to alter the putty settings for your connection to freebsd
  machines. Another way is changing the default shell to bash.

   But I have Bash as the default shell. And yes, it works changing the
 Terminal / Keyboard / Backspace key from Contrl-? (127) to
 Control-H, but the users are pissed off by the fact that Linux doesn't
 need this -- does it mean FreeBSD has broken termcap entries or that
 Linux is just stepping on the traditional standards ?

  Ady (@freebsd.ady.ro)
 
 | An age is called Dark not because the light fails to shine, but  |
 | because people refuse to see it. |
 |   -- James Michener, Space |




 To Unsubscribe: send mail to [EMAIL PROTECTED]
 with unsubscribe freebsd-questions in the body of the message



To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Re: Backspace and Delete keys under PuTTY

2002-12-10 Thread Jonathan Chen
On Tue, Dec 10, 2002 at 01:17:17PM +0200, Adrian Penisoara wrote:

[...]
   But I have Bash as the default shell. And yes, it works changing the
 Terminal / Keyboard / Backspace key from Contrl-? (127) to
 Control-H, but the users are pissed off by the fact that Linux doesn't
 need this -- does it mean FreeBSD has broken termcap entries or that
 Linux is just stepping on the traditional standards ?

It's Linux that's stepping on standards. Their default config is to
have erase=DEL. All other UNIX boxen I've used have erase=BACKASPCE.
I suspect the PUTTY writers have been heavily influenced by Linux.

Cheers.
-- 
Jonathan Chen [EMAIL PROTECTED]
--
 A person should be able to do a small bit of everything,
specialisation is for insects

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Re: Backspace and Delete keys under PuTTY

2002-12-10 Thread Marc Perisa

Am Dienstag den, 10. Dezember 2002, um 20:46, schrieb Jonathan Chen:


On Tue, Dec 10, 2002 at 01:17:17PM +0200, Adrian Penisoara wrote:

[...]

  But I have Bash as the default shell. And yes, it works changing the
Terminal / Keyboard / Backspace key from Contrl-? (127) to
Control-H, but the users are pissed off by the fact that Linux 
doesn't
need this -- does it mean FreeBSD has broken termcap entries or that
Linux is just stepping on the traditional standards ?

It's Linux that's stepping on standards. Their default config is to
have erase=DEL. All other UNIX boxen I've used have erase=BACKASPCE.
I suspect the PUTTY writers have been heavily influenced by Linux.


Hi Adrian,

it is not only for FreeBSD and Solaris but for Reliant Unix and HP-UX 
too.

As Jonathan said - Linux doesn't  behave like the others.

I hope that helps with your boss.

Marc



To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message


Re: Backspace and Delete keys under PuTTY

2002-12-10 Thread Peter
On Wed, 11 Dec 2002 10:52:40 +1100
JacobRhoden [EMAIL PROTECTED](by way of JacobRhoden [EMAIL PROTECTED]) wrote:

 On Wed, 11 Dec 2002 06:46, Jonathan Chen wrote:
  It's Linux that's stepping on standards. Their default config is to
  have erase=DEL. All other UNIX boxen I've used have erase=BACKASPCE.
  I suspect the PUTTY writers have been heavily influenced by Linux.
 
 I myself am going insane in an environment where every second box requires a
 different setting (rgh!! and stuff). Is there a way to override the local
 settings on the Linux/Solaris/etc... ?
 
 (Oh, and if you were writing an ssh client, would you default the settings to
 the standard, or to what works on all your machines *grin*)
 
 Jacob RhodenPhone: +61 3 8344 6102
 ITS DivisionEmail: [EMAIL PROTECTED]
 Melbourne University   Mobile: +61 403 788 386
 
 
 To Unsubscribe: send mail to [EMAIL PROTECTED]
 with unsubscribe freebsd-questions in the body of the message
 

This is the main reason I quit using PuttyI keep it around for 
emergencies, but I regularly I use the ssh client from ssh.com, a little bigger, but 
works much better.
---Peter---

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Re: backspace and del keys

2002-10-26 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2002-10-25 18:41:43 -0700:
 Oh well.  I've learned to live in ignorance when it comes to keys and
 fonts (among other things).

Yeah, I've had to, too. Terrible feeling, but this area is just too
much into voodoo^Wundocumented nightmare.

-- 
If you cc me or take the list(s) out completely I'll most likely
ignore your message.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Re: backspace and del keys

2002-10-25 Thread Giorgos Keramidas
On 2002-10-24 16:02, Michael Morris [EMAIL PROTECTED] wrote:
 Thanks for the quick response.
 
 Both of the keys on the keyboard marked Delete, above the cursor
 movement keys and in the numeric keypad appear to do the same thing.
 
 I have tried this inthe virtual console tty, XTerm, Konsole, and
 ETerm and they pretty much behave the same.

1. What is your TERM environment variable set to in each case?

2. What does the following command print?

% stty -a

Giorgos.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Re: backspace and del keys

2002-10-25 Thread Michael Morris

 
 1. What is your TERM environment variable set to in each case?

There are various $TERM values used.  In the virtual console it is
cons25, in the X based terminal emulators I have tries xter,
xterm-color, and linux.  All behave in similar manners.

 
 2. What does the following command print? 
   % stty -a
 
speed 38400 baud; 24 rows; 80 columns;
lflags: icanon isig iexten echo echoe echok echoke -echonl echoctl
   -echoprt -altwerase -noflsh -tostop -flusho pendin -nokerninfo
   -extproc
iflags: -istrip icrnl -inlcr -igncr ixon -ixoff ixany imaxbel -ignbrk
   brkint -inpck -ignpar -parmrk
oflags: opost onlcr -ocrnl -oxtabs -onocr -onlret
cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts
-dsrflow
   -dtrflow -mdmbuf
cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = undef;
   eol2 = undef; erase = ^H; erase2 = ^@; intr = ^C; kill = ^U;
   lnext = ^V; min = 1; quit = ^\; reprint = ^R; start = ^Q;
   status = ^T; stop = ^S; susp = ^Z; time = 0; werase = ^W;

This is using an X terminal emulator.  When in a virtual console erase2
is ^H, the same as erase.


Michael.



To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Re: backspace and del keys

2002-10-25 Thread Giorgos Keramidas
On 2002-10-25 08:00, Michael Morris [EMAIL PROTECTED] wrote:
  1. What is your TERM environment variable set to in each case?
 There are various $TERM values used.  In the virtual console it is
 cons25, in the X based terminal emulators I have tries xter,
 xterm-color, and linux.  All behave in similar manners.

Good.  I was looking for something strange in $TERM usage.

  2. What does the following command print? 
  % stty -a
eol2 = undef; erase = ^H; erase2 = ^@; intr = ^C; kill = ^U;

erase seems to be set to ^H.  When you run cat(1) and press DEL what
does your terminal show?  My cons25 terminal shows:

keramida@hades[19:34]/home/keramida$ cat
^?

Are you resetting any of erase or erase2 in your shell startup files
with stty?

Giorgos.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Re: backspace and del keys

2002-10-25 Thread Giorgos Keramidas
On 2002-10-25 09:48, Michael Morris [EMAIL PROTECTED] wrote:
  erase seems to be set to ^H.  When you run cat(1) and press DEL what
  does your terminal show?  My cons25 terminal shows:
 
  keramida@hades[19:34]/home/keramida$ cat
  ^?

 Mine shows ^[[3~

That's an xterm, I suppose.  Looks fine, in that case.

  Are you resetting any of erase or erase2 in your shell startup files
  with stty?

 There is a statement in the /etc/bashrc file:
 stty erase `tput kbs`

Hmmm.  Why? Try commenting out that .bashrc part.  What is `kbs'
supposed to be anyway?  The termcap(5) manpage doesn't mention a kbs
capability.

Giorgos.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Re: backspace and del keys

2002-10-25 Thread Gary W. Swearingen
Michael Morris [EMAIL PROTECTED] writes:

 When I run tput kbs, nothing is displayed.

When I run
echo 123$(tput kbs)456
I get
12456
apparently because tput kbs puts out some kind of backspace to
the shell.

I suspect that you need to read your shell's discussions of command line
processing.  Run bind (a shell built-in) and grep it's output for
del and back.  You should ensure that you've got your shell using
Emacs-style line editing.


Better yet, use the Control-D key for delete (the Emacs-style default)
and redefine the Delete keys for things you need less often.  :-)

Note that the key interpretation can be changed in an application (eg,
your shell), xterm X resources, termcap (?), your window manager config,
and in the X key config (in increasing precedence, I hope).

To take full advantage of your Internet/multimedia keyboard, you might
want to look into:
/usr/X11R6/lib/X11/xkb/
/usr/X11R6/man/man1/*xkb*
http://www.tsu.ru/~pascal/en/xkb/
Poor English, but sometimes better than official docs.
http://www.charvolant.org/~doug/xkb/
An Unreliable Guide to XKB Configuration

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Re: backspace and del keys

2002-10-25 Thread Michael Morris
Figured it out for xterms.  Readline(3) uses an initialization file
.inputrc to customize commands.  There was no inputrc file in the system
si I added one in etc and set INPUTRC=/etc/inputrc in the /etc/bashrc
file.  I actually took the file from my Linux system but is has the
following line.

\e[3~: delete-char

This works fine in X but does not change the virtual consoles.  That is
not a problem because I rarely use them.

The best thing about it is that I have learned quite a bit during this
little exercise.  You assistance is greatly appreciated.

On Fri, 2002-10-25 at 15:18, Gary W. Swearingen wrote:
 Michael Morris [EMAIL PROTECTED] writes:
 
  When I run tput kbs, nothing is displayed.
 
 When I run
 echo 123$(tput kbs)456
 I get
 12456
 apparently because tput kbs puts out some kind of backspace to
 the shell.

Yes, tput kbs returns the Backspace key for that terminal definition in
termcap.
 
 I suspect that you need to read your shell's discussions of command line
 processing.  Run bind (a shell built-in) and grep it's output for
 del and back.  You should ensure that you've got your shell using
 Emacs-style line editing.
 
 
 Better yet, use the Control-D key for delete (the Emacs-style default)
 and redefine the Delete keys for things you need less often.  :-)
 
 Note that the key interpretation can be changed in an application (eg,
 your shell), xterm X resources, termcap (?), your window manager config,
 and in the X key config (in increasing precedence, I hope).
 

I will work with bind and learn more about it.  It will come in handy
later.

 To take full advantage of your Internet/multimedia keyboard, you might
 want to look into:
 /usr/X11R6/lib/X11/xkb/
 /usr/X11R6/man/man1/*xkb*
 http://www.tsu.ru/~pascal/en/xkb/
 Poor English, but sometimes better than official docs.
 http://www.charvolant.org/~doug/xkb/
 An Unreliable Guide to XKB Configuration
 

Cool, thanks.  I ran across some of those last night and made a note to
revisit it later.  Could be another useful bit of knowledge.




To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Re: backspace and del keys

2002-10-25 Thread Giorgos Keramidas
On 2002-10-25 15:20, Michael Morris [EMAIL PROTECTED] wrote:
 On Fri, 2002-10-25 at 15:18, Gary W. Swearingen wrote:
  Michael Morris [EMAIL PROTECTED] writes:
 
   When I run tput kbs, nothing is displayed.
 
  When I run
  echo 123$(tput kbs)456
  I get
  12456
  apparently because tput kbs puts out some kind of backspace to
  the shell.

 Yes, tput kbs returns the Backspace key for that terminal definition in
 termcap.

Apparently not.  In my screen(1) window, I can see with stty -a that
erase is set to ^H.  My backspace key sends ^H and works fine as a
``backspace''.  The delete key sends ^[[3~.  The tput commands only
prints an ASCII 127 (DEL) character:

keramida@hades[02:07]/home/keramida$ tput kbs | hd
  7f|.|
0001

I'm not sure if that's correct, or a bug.  But it certainly won't
match your backspace key.  At worst, it will match your keyboard's
DEL key, and will create the impression that backspace and DEL keys
work backwards.

Giorgos.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Re: backspace and del keys

2002-10-25 Thread Gary W. Swearingen
Giorgos Keramidas [EMAIL PROTECTED] writes:

   keramida@hades[02:07]/home/keramida$ tput kbs | hd
     7f|.|
   0001
 
 I'm not sure if that's correct, or a bug.  But it certainly won't
 match your backspace key.  At worst, it will match your keyboard's
 DEL key, and will create the impression that backspace and DEL keys
 work backwards.

Good use of hd.
I get 08 (BS) instead of 7f.
And tput kdel gives 1b 4f 42.
As long as the two give different codes, his shell can translate them
as he likes, and he needn't fix lower-level key config.  Of course,
it doesn't change things for other apps.

I found kbs in /usr/X11R6/lib/X11/etc/xterm.terminfo, but it doesn't
have kdel, so I doubt if that's the source of even kbs.

Oh well.  I've learned to live in ignorance when it comes to keys and
fonts (among other things).

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Re: backspace and del keys

2002-10-24 Thread Giorgos Keramidas
Michael Morris [EMAIL PROTECTED] writes:
: The question/problem I am facing now is a keyboard issue.  The delete
: key is interpreted the same a the backspace key.  Can that be changed
: and where would I look for the info needed to change it?

What delete key?  What are you trying to when you discover
the apparent 'equality' of backspace and del?  Are you in
a virtual console tty?  In X11?  Are you running any programs
at the time?  What programs?

Giorgos.

PS: I have moved the thread in freebsd-questions.  The -newbies
list is not for asking general questions.  Please keep it here.



To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Re: backspace and del keys

2002-10-24 Thread Jonathan Chen
On Thu, Oct 24, 2002 at 04:02:05PM -0700, Michael Morris wrote:
 Thanks for the quick response.
 
 Both of the keys on the keyboard marked Delete, above the cursor
 movement keys and in the numeric keypad appear to do the same thing.
 
 I have tried this inthe virtual console tty, XTerm, Konsole, and ETerm
 and they pretty much behave the same. 
 
 This was done at the command line in sh, csh, and bash.  It was also
 tried in vim and Some GUI apps like Evolution.
 
 At the virtual console tty pressing the Delete key deletes the character
 to the left of the cursor rather than the one below it.  In XTer and
 ETerm is insets a tilde character.

To get XTerm to generate a DEL when you hit the Delete key, you need
to add the following line into ~/.Xdefaults:

xterm*deleteIsDEL:  true

-- 
Jonathan Chen [EMAIL PROTECTED]
--
   Do not take life too seriously.
   You will never get out of it alive.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Re: backspace and del keys

2002-10-24 Thread Michael Morris
On Thu, 2002-10-24 at 20:58, Jonathan Chen wrote:
 
 To get XTerm to generate a DEL when you hit the Delete key, you need
 to add the following line into ~/.Xdefaults:
 
 xterm*deleteIsDEL:  true

Nothing changed with this line in the file.




To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message