Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1292
  • Last Modified:

'backspace' differs between sun machine and windows with exceed

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
red5
Asked:
red5
1 Solution
 
ahoffmannCommented:
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
 
red5Author Commented:
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
 
ahoffmannCommented:
> .. 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
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
gandalf94305Commented:
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
 
red5Author Commented:
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
 
ahoffmannCommented:
> 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
 
red5Author Commented:
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
 
tfewsterCommented:
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
 
SpideyModCommented:
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now