Solved

'backspace' differs between sun machine and windows with exceed

Posted on 2002-07-01
9
1,283 Views
Last Modified: 2008-02-01
I work with a Sun workstation and a Windows PC.

Largely for cut and paste reasons and not having to remember which keyboard I'm supposed to use - I use exceed on my PC to work on the unix machine.

Strangely, the 'backspace' key behaves differently between the two environments, however.

My shell is tcsh.  'edit' is set.

On the actual Sun machine, 'backspace' works as a "backward-delete-char", which seems to be like ^h

Via Exceed, 'backspace' works as a "delete-char-or-list-or-eof", which seems to be like ^d.

There seem to be a lot of ways to map keys in unix:
- set/unset 'edit'
- use bindkey
- stty

There's ^h and ^d type characters; then there's "backward-delete-char" and "delete-char-or-list-or-eof", etc.

I don't understand how they all connect together and where the backspace key is getting messed up.

For xterm, I can set a macro in exceed that does a "^h" character, but that doesn't work for other things like emacs, which doesn't interpret ctrl-h as "backward-delete-char".

Please help me understand this!!
0
Comment
Question by:red5
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 51

Expert Comment

by:ahoffmann
ID: 7124038
depends on many things, unfortunately.
  - stty
  - /etc/termcap (or termlib)
  - used shell (check with: echo $SHELL)
  - used terminal (check with: echo $TERM)
  - used terminal window (hard to check: echo $TERM #usually)

in most cases either of following commands should do what you want:
   stty erase '^?' ; reset
   stty erase '^H' ; reset
Sometimes you need to redefine the TERM environment variable to a proper value. xterm is a good one on Solaris (except you are using Solaris' proprietary cmdtool). If all fails, try to set TERM to vt100.

emacs and vi are very picky on the TERM variable, 'cause they both use it to get the appropriate information from /etc/termcap. emacs have some more dragons to beat, 'cause it can redefine allmost anything when it is started.
0
 

Author Comment

by:red5
ID: 7124833
hmm, I tried the stty commands and changing the TERM to vt100; no luck.  Here's some output before any of those changes:

/home/red5 > stty
speed 9600 baud; evenp hupcl
rows = 70; columns = 108; ypixels = 914; xpixels = 667;
erase = ^h; kill = ^c; swtch = <undef>; werase = ^d;
brkint -inpck icrnl -ixany onlcr
echo echoe echok echoctl echoke iexten
/home/red5 > echo $SHELL
/bin/tcsh
/home/red5 > echo $TERM
xterm


I'm wondering if exceed is changing the key mapping so that the sun machine sees 'backspace' as a different key depending on whether it comes from its local keyboard or via exceed.

Is there some program I can write to display a key code or something?
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 7125442
> .. wondering if exceed is changing the key mapping
YES IT DOES. unfortnately, luckily
Try to switch of the Backspace/Delte features in exceed.

> display a key code or something?
some X Server come with a program called xkeycaps ...
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Expert Comment

by:gandalf94305
ID: 7163594
I have two aliases: ^H setting stty erase to control-h (backspace) and ^? setting stty erase to delete. Whenever I notice something is not working properly, I can quickly switch.

--g.
0
 

Author Comment

by:red5
ID: 7165254
I still don't understand exactly how it everything plugs together.

Using 'stty' to, for example, set erase = ^H, suggests that this is a translation.  But which is being translated to which?

Does the xterm receive some kind of "erase" and it translates it to "^H" or the other way around?

And what about things like "delete-char-or-list-or-eof"?  Where does this come in.

There must be a traceable sequence; like, when a key is pressed, it goes to ThingA with a TypeA and because ThingB is set to whatever, the key gets translated to TypeB, and so on...
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 7165313
> There must be a traceable sequence;
For shure: there are at least 3 such tables !!
   1. hardware driver
   2. OS
   3. application (X-server)
   4. application (xterm)
   5. application (shell)
   6. application (vi)
all of these tables may be modified with approriate commands (stty, xmodmap, loadkey), it also depends where your are: local or remote X-Server.
In your case there might be:
   2a. Exceed
If you want to know/learn all the details, you need to read lot of docs, and do some try&error. Best you start at a plaine text console (no X involved) to get the basics.
The most complex parts are the tables in the X-Server.
0
 

Author Comment

by:red5
ID: 7269660
Well, I haven't really learned much new about keycodes in the world of unix, but I have figured out my problem.

In the Exceed keyboard mapping, the Unshifted Backspace key was mapped to 'BackSpace' and the Shifted Backspace key was mapped to 'Delete'.  Now, I wasn't using Shift with Backspace, but it turns out if I clear the mapping for the Shifted backspace key, then backspace behaves properly.

Weird.  Some kind of Exceed bug, maybe.  I know that 'Shifted' means what I think it means, becuase (as a test) I mapped the Shifted backspace key to 'X' and the result was that backspace alone performed backspace, and Shift+BackSpace performed 'X'.
0
 
LVL 21

Expert Comment

by:tfewster
ID: 7921518
No comment has been added lately, so it's time to clean up this Topic Area.
I will leave a recommendation for this question in the Cleanup topic area as follows:

- PAQ & refund points

Please leave any comments here within the next 7 days

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

tfewster
Cleanup Volunteer
0
 

Accepted Solution

by:
SpideyMod earned 0 total points
ID: 7967174
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question