LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 08-06-2005, 06:23 AM   #1
frankie_DJ
Member
 
Registered: Sep 2004
Location: NorCal
Distribution: slackware 10.1 comfy, Solaris10 learning
Posts: 232

Rep: Reputation: 32
Backspace key in console; Visual bell


I have Ultra 10 with SVGA monitor, running Solaris 10. Two questions:

1)
How do I adjust Backspace key to work for me properly in the console? When I use bash everything is fine. For sh, I have to do
Code:
 stty erase <Backspace>
so I guess I can fix that one.
However in vi, it behaves as a left arrow - it goes to the left without erasing anything. In cat and my own shell scripts, Backspace just keeps writing ^Hs on the screen. It is the same at the login screen. Can I do something about this?

2) I think this thing is called visual bell. It is like black wave that goes over my screen when I do tab completion or something like that. It annoys me to no end, because it's awfully slow to pass by. Can I change it to the sound warning or something? Or maybe have it do its thing faster?

I checked man tset and man stty, I know answers are in there somewhere, but those two manuals are deciferable to me.
In Linux there is /etc/inputrc file to configure in this situation, but I can't seem to find it on my solaris machine.

Last edited by frankie_DJ; 08-06-2005 at 08:16 AM.
 
Old 08-06-2005, 11:51 AM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Quote:
However in vi, it behaves as a left arrow - it goes to the left without erasing anything.
Are you asking about vi insert mode or command mode ?
In command mode, it looks to me the expected backspace behaviour.
In insert mode, it erases the character when they have just been inserted previously in, but only show they have been deleted when insert mode is left with <Escape>.

Quote:
In cat and my own shell scripts, Backspace just keeps writing ^Hs on the screen. It is the same at the login screen.
^H is backspace character visual representation when not catched by the driver.
As you already found,
stty erase <Backspace>
is the way to have the driver interpret it as an instruction to erase the previous character.

As of changing system key mapping, should you really want this odd situation commonly found with linux where the backspace key send delete and delete send backspace, or whatever, it can be done by playing with loadkeys.

man keytables
man loadkeys

About the visual bell issue, I do not experience it.
What is your TERM variable value when in console ?
What shell are your running ?
 
Old 08-06-2005, 12:29 PM   #3
frankie_DJ
Member
 
Registered: Sep 2004
Location: NorCal
Distribution: slackware 10.1 comfy, Solaris10 learning
Posts: 232

Original Poster
Rep: Reputation: 32
Well I am not sure if that's the visual bell, but it happens at the times visual bell would (too many backspaces, command completion). Like, screen blackens starting from the top and than whitens back from the top. Is that what the visual bell does? My TERM is sun. Happens in every shell, for every user equally. I guess it wouldn't bother me so much if it doesn't take FOREVER, like 4-5 seconds, and I can't type during that time (Can you imagine hitting 4,5 extra backspaces? I could go for a nap.) Can I adjust its time length or something?


BTW you are right about vi. I guess that's the way it works, I always used vim before. I saw in one of the threads that you have issues with vim. What are they?

Last edited by frankie_DJ; 08-06-2005 at 02:25 PM.
 
Old 08-06-2005, 06:04 PM   #4
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
I don't think you can adjust this time, as I already told, I do not experience that with consoles (I didn't tried with a U10 though).

I found that in the wscons manual page, which may give one clue:
Code:
     Bell (BEL),
     CTRL-G
     0x7

         Used for consoles that are not equipped with an  audible
         bell.  Current  Sun  workstation  models  also flash the
         screen if the keyboard is not the console input device.

Quote:
I saw in one of the threads that you have issues with vim. What are they?
I just happen to prefer elvis as a vi enhanced clone.
As a long time vi user, I dislike vim not always behaving the way I expect while elvis is sticking better to vi standard.
That said, are you sure backspace is really erasing characters with vim ?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
fix backspace key? Jim Blackwood Linux - Laptop and Netbook 1 02-26-2005 08:29 PM
STTY and backspace key ministre Linux - Newbie 2 07-09-2004 01:46 PM
Backspace key mapping in vi arobic Linux - General 2 06-30-2004 01:30 PM
Getting a ^H on backspace key mlawler Linux - Software 1 04-28-2004 05:56 PM
Backspace key problem fr0zen Linux - General 0 12-23-2003 02:30 PM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 10:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration