<HTML ><HEAD ><TITLE >What If Nothing Works</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+ "><LINK REL="HOME" TITLE="Linux Backspace/Delete mini-HOWTO" HREF="index.html"><LINK REL="PREVIOUS" TITLE="What You Should Do On Your System" HREF="system.html"><LINK REL="NEXT" TITLE="More Hacking" HREF="morehack.html"></HEAD ><BODY CLASS="SECT1" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >Linux <B CLASS="KEYCAP" >Backspace</B >/<B CLASS="KEYCAP" >Delete</B > mini-HOWTO</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="system.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="morehack.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="SECT1" ><H1 CLASS="SECT1" ><A NAME="NOTWORK">7. What If Nothing Works</H1 ><P >The first thing to do is understanding which <SPAN CLASS="ACRONYM" >ASCII</SPAN > codes are produced by a certain key using the <A HREF="system.html#DEVIANCE" >C one-liner</A >.</P ><P >Once you know which sequences are produced, you must check the current <SPAN CLASS="APPLICATION" >terminfo</SPAN > entry with <B CLASS="COMMAND" >infocmp</B > (don't be scared by the amount of information printed!) and be sure that the <TT CLASS="LITERAL" >kbs</TT > and <TT CLASS="LITERAL" >kdch1</TT > capabilities correspond to the right sequences (that is, the one produced by the respective keys). Moreover, you must check with <B CLASS="COMMAND" >stty -a</B > that the erase character is the one emitted by the <B CLASS="KEYCAP" >Backspace</B > key (note that <TT CLASS="LITERAL" >^H</TT > represent <SPAN CLASS="SYMBOL" >BS</SPAN > whereas <TT CLASS="LITERAL" >^?</TT > represents <SPAN CLASS="SYMBOL" >DEL</SPAN >).</P ><P >If there is a mismatch, there can be several different reason: wrong content of the <TT CLASS="ENVAR" >TERM</TT > variable, wrong entry of the terminal database, wrong terminal emulation under X. I hope at this point you have enough information to dig the solution autonomously.</P ><DIV CLASS="NOTE" ><P ></P ><TABLE CLASS="NOTE" WIDTH="100%" BORDER="0" ><TR ><TD WIDTH="25" ALIGN="CENTER" VALIGN="TOP" ><IMG SRC="../images/note.gif" HSPACE="5" ALT="Note"></TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P >If different applications behave in different ways, it is likely that some of them are using the terminal database correctly, and some are not. Remember that the fact that the keys produce the right behaviour in a certain application does not mean that the application is using correctly the terminal database—they could work just by chance. If you want to have an independent check, you can try whether the <A HREF="http://ne.dsi.unimi.it/" TARGET="_top" ><B CLASS="COMMAND" >ne</B ></A > editor works. <B CLASS="COMMAND" >ne</B > uses all terminal capabilities, including <TT CLASS="LITERAL" >kbs</TT > and <TT CLASS="LITERAL" >kdch1</TT >, and uses intended meaning only as a last resource.</P ></TD ></TR ></TABLE ></DIV ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="system.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="morehack.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >What You Should Do On Your System</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" > </TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >More Hacking</TD ></TR ></TABLE ></DIV ></BODY ></HTML >