Viewing Issue Simple Details Jump to Notes ] Wiki ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0007013 [DCSS] Bug Report minor always 2013-05-05 00:13 2013-07-06 15:42
Reporter hhkb View Status public  
Assigned To neil
Priority normal Resolution done  
Status closed   Product Branch 0.13 ancient branch
Summary 0007013: Ctrl-H generates unknown command
Description Using xterm 292 (TERM=xterm) and ncurses 5.9, crawl generates an "Unknown command" on ctrl-h. The fix is trivial - tweak unix_get_vi_key to recognize KEY_BACKSPACE. I'm not sure how the online servers avoid this - I guess they're using a term that generates non-keypad backspace (8).

One can check the keycode generated with this snippet: https://gist.github.com/anonymous/0b424eecd75c9c2815ec [^]
Additional Information
Tags No tags attached.
Attached Files ? file icon 0001-Fix-ctrl-h-on-terminals-that-generate-KEY_BACKSPACE.patch [^] (879 bytes) 2013-05-05 00:18 [Show Content]

- Relationships

-  Notes
(0022820)
neil (administrator)
2013-05-26 01:52

It seems completely wrong for your terminal to send ^? (what I assume this is) on ctrl-h. I haven't been able to reproduce with xterm 278 and ncurses 5.9 with or without numlock and with or without manually toggling "Enable Application Keypad".
(0022821)
neil (administrator)
2013-05-26 02:09

I see, this is a terminal where key_backspace is ctrl-h, so curses can't distinguish between them and goes with KEY_BACKSPACE instead of 0x8
(0022825)
hhkb (reporter)
2013-05-26 02:24

I think the conclusion we came to is that in some cases key_backspace=^h. This screws everything up. We can modify crawl to handle this use case by checking if backspace=^h first.
(0022828)
neil (administrator)
2013-05-26 02:54

Fixed in trunk (0.13-a0-922-ga797ddd), thanks! Rather than converting unconditionally as in your patch, I only did so if terminfo key_backspace is ctrl-h, so that the two keys don't get merged on terminals where they differ.

- Issue History
Date Modified Username Field Change
2013-05-05 00:13 hhkb New Issue
2013-05-05 00:18 hhkb File Added: 0001-Fix-ctrl-h-on-terminals-that-generate-KEY_BACKSPACE.patch
2013-05-05 00:18 hhkb Issue Monitored: hhkb
2013-05-26 01:52 neil Note Added: 0022820
2013-05-26 02:09 neil Note Added: 0022821
2013-05-26 02:24 hhkb Note Added: 0022825
2013-05-26 02:54 neil Note Added: 0022828
2013-05-26 02:54 neil Status new => resolved
2013-05-26 02:54 neil Fixed in Branch => 0.13 development branch
2013-05-26 02:54 neil Resolution open => done
2013-05-26 02:54 neil Assigned To => neil
2013-07-06 15:42 hhkb Status resolved => closed


Mantis 1.1.8[^]
Copyright © 2000 - 2009 Mantis Group
Powered by Mantis Bugtracker