How to make Delete key delete forward?

How to make Delete key delete forward?

Post by Larry Elmor » Wed, 20 Sep 2000 11:37:43



I've read through every FAQ I can find, every man page that seems like it
might be applicable, and tried everything I can think of based on my Linux
experience, but I still can't find a way to make the 'Delete' key on my
Ultra 5 delete forward instead of duplicating the effects of 'Backspace' and
'Ctrl-h'. I'm beginning to wonder if this is even possible, though surely it
must be? Perhaps I'm blind or very dense and the answer is staring me right
in the face and I'm failing to recognize it, but could somebody please offer
a specific suggestion? (i.e. not something like "use xmodmap" -- I've tried
that with numerous variations in arguments -- but xmodmap with the specific
keycodes and/or keysyms that are needed)

This is the last remaining annoyance with my Sun keyboard, and I'd really
like to lay it to rest since I normally use 'delete-forward' frequently when
editing a command line.

Thanks in advance!

Larry

 
 
 

How to make Delete key delete forward?

Post by Logan Sh » Wed, 20 Sep 2000 04:00:00




>I've read through every FAQ I can find, every man page that seems like it
>might be applicable, and tried everything I can think of based on my Linux
>experience, but I still can't find a way to make the 'Delete' key on my
>Ultra 5 delete forward instead of duplicating the effects of 'Backspace' and
>'Ctrl-h'. I'm beginning to wonder if this is even possible, though surely it
>must be?

  :
  :

Quote:>This is the last remaining annoyance with my Sun keyboard, and I'd really
>like to lay it to rest since I normally use 'delete-forward' frequently when
>editing a command line.

Well, here are some thoughts that might get you closer to your goal:

  - /usr/openwin/demo/xev will show you what's happening in terms of
    keysyms and keycodes when you hit that key.  You should be getting
    a Delete keysym.  If you are, then the X server itself is
    configured O.K. -- it's a matter of applications that use the
    server properly interpreting that keysym.

  - All the xmodmap-ing in the world won't change a thing if your
    shell treats a delete (ascii 127, a/k/a ^?) the same as a backspace
    (ascii 8, a/k/a ^H).

  - Your shell doesn't see keysyms at all.  It runs under a terminal,
    so it just sees tty input which means control characters.  xterm
    (or whatever terminal emulator you use -- maybe dtterm instead)
    chooses how it's going to translate that keysym into some input for
    the tty.

  - You didn't mention whether your problem is in a shell or what.
    I'm assuming it is a shell you're having problems with since you
    mentioned "editing a command line".

  - You also didn't mention which shell you're using.  If you're using
    ksh, you probably need to rebind an input sequence to a command
    history editing function.

  - There's even a level of translation between the shell and the
    xterm -- the tty's input processing.  You might need to use
    "stty -a" to see whether the input that your terminal emulator
    generates when you hit that delete key is set up as one of the
    keys that are specially processed by the tty.

  - control-d does the job just fine in emacs editing mode, as does "x"
    in vi editing mode.

Hope that helps.

  - Logan

 
 
 

How to make Delete key delete forward?

Post by Casper H.S. Dik - Network Security Engine » Wed, 20 Sep 2000 04:00:00


[[ PLEASE DON'T SEND ME EMAIL COPIES OF POSTINGS ]]


>I've read through every FAQ I can find, every man page that seems like it
>might be applicable, and tried everything I can think of based on my Linux
>experience, but I still can't find a way to make the 'Delete' key on my
>Ultra 5 delete forward instead of duplicating the effects of 'Backspace' and
>'Ctrl-h'. I'm beginning to wonder if this is even possible, though surely it
>must be? Perhaps I'm blind or very dense and the answer is staring me right
>in the face and I'm failing to recognize it, but could somebody please offer
>a specific suggestion? (i.e. not something like "use xmodmap" -- I've tried
>that with numerous variations in arguments -- but xmodmap with the specific
>keycodes and/or keysyms that are needed)

It's not a keyboard, it's an application think.  Personally, I hate
delete forward (I don't type to the right of the cursor anyway),
and feel that backspace should just reposition whereas delete should
actually rub out as it did on some type writers.  I'm not sure which genius
thought that backspace and Delete did more or less the same so he could
redefine delete, but he ought to be .....

Quote:>This is the last remaining annoyance with my Sun keyboard, and I'd really
>like to lay it to rest since I normally use 'delete-forward' frequently when
>editing a command line.

Since you want to delete forward on your command line, you must
have a shell able of command line editing.

All shells I know that do this (tcsh, bash, ksh) use ^D for "delete-char";
you can remap this in some cases:

In tcsh, this is:

                bindkey '^?' delete-char
In bash:

                bind ^?:delete-char

Ksh: ???

Casper
--
Expressed in this posting are my opinions.  They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.

 
 
 

How to make Delete key delete forward?

Post by Larry Elmor » Thu, 21 Sep 2000 04:00:00





> >I've read through every FAQ I can find, every man page that seems like it
> >might be applicable, and tried everything I can think of based on my
Linux
> >experience, but I still can't find a way to make the 'Delete' key on my
> >Ultra 5 delete forward instead of duplicating the effects of 'Backspace'
and
> >'Ctrl-h'. I'm beginning to wonder if this is even possible, though surely
it
> >must be?

> Well, here are some thoughts that might get you closer to your goal:

>   - /usr/openwin/demo/xev will show you what's happening in terms of
>     keysyms and keycodes when you hit that key.  You should be getting
>     a Delete keysym.  If you are, then the X server itself is
>     configured O.K. -- it's a matter of applications that use the
>     server properly interpreting that keysym.

>   - All the xmodmap-ing in the world won't change a thing if your
>     shell treats a delete (ascii 127, a/k/a ^?) the same as a backspace
>     (ascii 8, a/k/a ^H).

>   - Your shell doesn't see keysyms at all.  It runs under a terminal,
>     so it just sees tty input which means control characters.  xterm
>     (or whatever terminal emulator you use -- maybe dtterm instead)
>     chooses how it's going to translate that keysym into some input for
>     the tty.

>   - You also didn't mention which shell you're using.  If you're using
>     ksh, you probably need to rebind an input sequence to a command
>     history editing function.

I'm using bash, and bind did the trick for that, at least. I'd been hoping
for a more general solution, but I suppose there isn't or there would've
been an answer in one of the FAQs. Now I'm looking for a text editor that
will work or allow itself to be configured so the d*** Delete key works the
way I've become accustomed to it working over the last 15 years...

Quote:>   - There's even a level of translation between the shell and the
>     xterm -- the tty's input processing.  You might need to use
>     "stty -a" to see whether the input that your terminal emulator
>     generates when you hit that delete key is set up as one of the
>     keys that are specially processed by the tty.

Was the object in designing things this way just an attempt to see how many
layers of complexity someone could add to a simple job? I suppose things
just evolved and layers got added, but this reminds me of the way some USAF
comm systems I worked on were designed (apparently with an eye towards
maximum contractor work (and profit) and bloated military organizational
empires).

Quote:> Hope that helps.

It did. Thank you!

Larry

 
 
 

How to make Delete key delete forward?

Post by Larry Elmor » Thu, 21 Sep 2000 04:00:00




Quote:> [[ PLEASE DON'T SEND ME EMAIL COPIES OF POSTINGS ]]

I did know I had...


> >I've read through every FAQ I can find, every man page that seems like it
> >might be applicable, and tried everything I can think of based on my
Linux
> >experience, but I still can't find a way to make the 'Delete' key on my
> >Ultra 5 delete forward instead of duplicating the effects of 'Backspace'
and
> >'Ctrl-h'. I'm beginning to wonder if this is even possible, though surely
it
> >must be? Perhaps I'm blind or very dense and the answer is staring me
right
> >in the face and I'm failing to recognize it, but could somebody please
offer
> >a specific suggestion? (i.e. not something like "use xmodmap" -- I've
tried
> >that with numerous variations in arguments -- but xmodmap with the
specific
> >keycodes and/or keysyms that are needed)

> It's not a keyboard, it's an application think.  Personally, I hate
> delete forward (I don't type to the right of the cursor anyway),

Really? Not even when you have to correct something at the beginning of a
long line you've typed? That's when I use delete-forward a lot, after I've
backed up by words (or the whole line) and what needs deleting is ahead of
the cursor. Happens even more often in text editors than the shell, which is
why I'm very surprised that delete and backspace both delete-backwards in
each of the text editors I've tried on my Ultra.

Quote:> and feel that backspace should just reposition whereas delete should
> actually rub out as it did on some type writers.

That's what arrow keys are for :)  You didn't happen to learn typing on a
typewriter, did you?

Quote:> I'm not sure which genius
> thought that backspace and Delete did more or less the same so he could
> redefine delete, but he ought to be .....

I share the same thoughts about the clowns who decided they really did do
the same thing and made it the default behavior on some systems!

Quote:> >This is the last remaining annoyance with my Sun keyboard, and I'd really
> >like to lay it to rest since I normally use 'delete-forward' frequently
when
> >editing a command line.

> Since you want to delete forward on your command line, you must
> have a shell able of command line editing.

> All shells I know that do this (tcsh, bash, ksh) use ^D for "delete-char";
> you can remap this in some cases:

bind did the trick in bash. Thanks for the suggestion!

Larry

 
 
 

How to make Delete key delete forward?

Post by Rich Tee » Thu, 21 Sep 2000 04:00:00



> Really? Not even when you have to correct something at the beginning of a
> long line you've typed? That's when I use delete-forward a lot, after I've
> backed up by words (or the whole line) and what needs deleting is ahead of
> the cursor. Happens even more often in text editors than the shell, which is
> why I'm very surprised that delete and backspace both delete-backwards in
> each of the text editors I've tried on my Ultra.

If you're in vi, the x key will do what you want.

--
Rich Teer

NT tries to do almost everything UNIX does, but fails - miserably.

The use of Windoze cripples the mind; its use should, therefore, be
regarded as a criminal offence.  (With apologies to Edsger W. Dijkstra)

Voice: +1 (250) 979-1638
URL: http://www.rite-online.net

 
 
 

How to make Delete key delete forward?

Post by Rich Tee » Fri, 22 Sep 2000 04:00:00



> I'm using bash, and bind did the trick for that, at least. I'd been hoping
> for a more general solution, but I suppose there isn't or there would've
> been an answer in one of the FAQs. Now I'm looking for a text editor that
> will work or allow itself to be configured so the d*** Delete key works the
> way I've become accustomed to it working over the last 15 years...

Bah!  Next you'll be wanting the Cpas Lock key top o be moved to where the
Control Key belongs - next to the A.

Quote:> Was the object in designing things this way just an attempt to see how many
> layers of complexity someone could add to a simple job? I suppose things

Nope - it was designed to be flexible.  Back in the old days, there were many
different terminal types, so the system HAD to be flexible.

--
Rich Teer

NT tries to do almost everything UNIX does, but fails - miserably.

The use of Windoze cripples the mind; its use should, therefore, be
regarded as a criminal offence.  (With apologies to Edsger W. Dijkstra)

Voice: +1 (250) 979-1638
URL: http://www.rite-online.net

 
 
 

1. How to (setq delete-key-deletes-forward t) in syscons?

Hi all,

after 5 years using Linux I now decided to set up a FreeBSD-System ...
I already configured a lot of stuff, but there's one thing that won't get
fixed ...

How can I learn syscons to use my delete-key to delete forward?
Like in xemacs: (setq delete-key-deletes-forward t)
Currently it does exactly the same as backspace and deletes backward.

I played around with stty, tset and other stuff and found out that
kbdcontrol could be the solution (61 is the key # of my delete key) ...
$ kbdcontrol -f 61 ...
But I don't know which escape sequence kbdcontrol needs to do the desired
thing.

Tx,
        -- Martin

--
$ echo > /dev/null -e "Info about GPG:\n\
Martin Koehler\t[GPG KeyID = 464CBFB7]\n\
[GPG Key fingerprint = E4C9 E1D4 B5CF 6739 635A  7C35 8D49 4144 464C BFB7]"

2. RedHat 8 freezes on startup, can't activate eth0!

3. Remapping Keys (want delete key to delete etc!)

4. communicating programmatically with a secure server

5. getting Delete key to DELETE on RS6000

6. new mount/umount/swapon/swapoff available

7. how can my delete key delete?

8. AS 200 on Ebay

9. How Do I Get Delete Key to delete?

10. delete key = delete-next-char?

11. newbie question: backspace key in Netscape is acting like the delete key

12. X11: Backspace key same as delete key? Solution?

13. backspace key is behaving like a delete key