On Sat, Aug 01, 2026 at 09:53:37PM -0300, Jim via Mutt-dev wrote:
> On Sat, Aug  1, 2026 at 21:47 (-0300), Jim wrote:
> 
> > On Sat, Aug  1, 2026 at 18:34 (-0400), Kurt Hackenberg wrote:
> 
> >> On Sat, Aug 01, 2026 at 18:05 -0300, Jim via Mutt-dev wrote:
> 
> >>>> Moreover, Jim also said that the Delete key of
> >>>> his keyboard sends ^H (instead of the usual escape sequence).
> 
> >>> Or so says my shell when I type Ctrl-V <delete key>.
> 
> >> That's with X and a terminal emulator?
> 
> > Yes.  Specifically, urxvt.  Same in xterm.
> 
> >> That is peculiar. I would look into why that ^H happens.  Something
> >> strange in X keyboard input, I guess.  Do you configure that keyboard
> >> input in any way, maybe through xmodmap?
> 
> > No.  A few messages ago (I didn't realize my ideas about "delete" meaning
> > "delete backwards" were going to take on a life of their own) I mentioned
> > that back in 2004 I used to swap backspace and delete with xmodmap, but
> > since then I haven't had to do it.  I may have known at the time what
> > changed, but if I did, that memory is long gone.
> 
> >> What does xev say about the Delete key?
> 
> > It says
> 
> > KeyPress event, serial 33, synthetic NO, window 0x5200001,
> > root 0x6ab, subw 0x0, time 607437571, (105,127), root:(286,252),
> > state 0x0, keycode 119 (keysym 0xffff, Delete), same_screen YES,
> > XLookupString gives 1 bytes: (7f) ""
> > XmbLookupString gives 1 bytes: (7f) ""
> > XFilterEvent returns: False
> 
> > which makes a certain amount of sense (to me, anyway): the "delete" key
> > sends the "Delete" keysym and XLookupString turns that into the ASCII DEL
> > character.
> 
> 
> > Bonus information:
> 
> > My termlib entry says  kdch1=\E[3~.
> 
> > Interestingly (or not) with xfce4-terminal, at my shell prompt,
> > Ctrl-V <delete>
> > outputs <Esc>[3~, and kdch1 is the same \E[3~ there.
> 
> "Mystery" (partially?) solved.  I see that (presumably since 2004 or so) I
> have X resources for xterm
>         XTerm*backspacekey:   \177
>         XTerm*deletekey:      \010

those aren't recognized by xterm (see manpage)

> and
>         URxvt.deletekey:      \010

this is recognized by urxvt (manpage):

       deletekey: string
           The  string  to send when the delete key (not the keypad delete key)
           is pressed.  If  unset  it  will  send  the  sequence  traditionally
           associated with the Execute key.

> (No URxvt.backspacekey, but at least this explains why I get ^H and not
> \E[3~ when I press the "delete" key.)
> 
>                                 Jim
> 
> 

-- 
Thomas E. Dickey <[email protected]>
https://invisible-island.net

Attachment: signature.asc
Description: PGP signature

Reply via email to