Thanks to all for the info on mapping keys and for the scripts to help
me map the keys.  Now I have another question.  Is there a way to make a
key generate a different escape sequence?

For example, on an HP-UX machine we have, hitting backspace creates the
escape sequence ^?.  Is there a way I can arbitrarily change that to
whatever I want?  Like, ^H or ^@ or anything else?

Thanks in advance,

Warren

-----Original Message-----
From: Derek D. Martin [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 14, 2002 1:27 PM
To: [EMAIL PROTECTED]
Subject: Re: Terminal Question


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

At some point hitherto, Mansur, Warren hath spake thusly:

> OK, let's say I have to log into several different kind of UNIXes
> and Linux boxes throughout the day from different OS's.  Then let's
> say that half the time I log in, the delete key doesn't work but the
> backspace does.  My simple question is, if I don't have root
> priviledges on a machine, how can I make sure that the delete key
> will always work when I log in to the various machines?  Is it
> something to do with stty?

Yes, no, or maybe; depending. :)

This is one of my biggest pet peeves in using Unix systems, and it is
NOT easy to solve.  The problem is there are multiple factors,
including what key your system thinks is 'backspace' or 'delete',
which codes they send to the terminal driver, and how those codes are
interpreted by the termcap/terminfo databases on your system.  If you
are using the X window System, controlling what key sends what code is
done differently than if you're using the text console.

You may find help here:

  http://www.linuxdoc.org/HOWTO/Keyboard-and-Console-HOWTO-5.html

Linuxdoc is your friend.  ;-)

I include these in my .profile/.bashrc, which generally seem to solve
the problem (provided your keyboard sends consistent codes to the
relevant driver):

  stty erase "^?" kill "^u" intr "^c" susp "^z"
  ERASE="^?"; export ERASE

Though, I currently only have Linux systems to worry about...

> Also, while I'm at it, can someone point me to a good place to learn
> about re-mapping my keys to do something useful (Example: re-mapping
> CapsLock to Ctrl),

I would debate that this is useful...  ;-)  And again, it depends on
if you're using X or not, and there are probably more than one way.

As far as Linux goes, for the console, check out dumpkeys(1),
showkey(1), and loadkeys(1).  For X, you can probably twiddle the
XF86Config file, or look at xmodmap(1) and xev(1).


> and even setting some of my keys to be 'macro' keys (Example: Hit
> F10 and then some long convoluded command gets executed that usually
> I have to type over and over)?

Try reading the Keyboard-and-Console-HOWTO that I mentioned earlier.
There may be something in there about it.  But again, it will probably
be different for X and not X, and in X many window managers use the
function keys for specific (though often remappable) things.  So then
you have a 3rd element to worry about...  

Good luck!

- -- 
Derek Martin               [EMAIL PROTECTED]    
- ---------------------------------------------
I prefer mail encrypted with PGP/GPG!
GnuPG Key ID: 0x81CFE75D
Retrieve my public key at http://pgp.mit.edu
Learn more about it at http://www.gnupg.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8bAFpdjdlQoHP510RAhLJAJ95RHrv21Us9yqNjqpi5BTPvhgg/ACdFHZG
ZlSZWAtP7ntklHDmIn+pNPw=
=V/Gk
-----END PGP SIGNATURE-----

*****************************************************************
To unsubscribe from this list, send mail to [EMAIL PROTECTED]
with the text 'unsubscribe gnhlug' in the message body.
*****************************************************************

*****************************************************************
To unsubscribe from this list, send mail to [EMAIL PROTECTED]
with the text 'unsubscribe gnhlug' in the message body.
*****************************************************************

Reply via email to