- Previous change to #ifdefs DISABLE_TABCOMP and NANO_SMALL rolled
back. (Rocco)
- Various #ifdef & #ifndef cleanups. (Rocco)
+ - Added message for when keypad goes awry. Added code in main and
+ function print_numlock_warning() to notify user, and added an
+ apropriate section in the faq to refer to this brokenness.
- configure.in:
- Fix for _use_keypad check breaking slang support (Christian
Weisgerber).
- faq.html:
- Added some info on making the binary smaller with the configure
script.
+ - Added section on keypad bugginess.
- files.c:
real_dir_from_tilde()
- Oops, fix case where buf ="~", silly crash (bug discovered by
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
+<title>The nano editor FAQ</title>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Mozilla/4.73 [en] (X11; U; Linux 2.2.16 i586) [Netscape]">
<br><font color="#330000"><a href="#4.5">4.5. When I type in a
search string, the string I last searched for is already in front of
my cursor! !What happened?!</a></font>
-<br><a href="#4.6">4.6 How do I make nano my default editor (in Pine,
-mutt, etc.)?</a></blockquote>
+<br><font color="#330000"><a href="#4.6">4.6. I get the message "NumLock
+glitch detected. Keypad will malfunction without NumLock on." What
+gives?</a></font>
+<br><font color="#330000"><a href="#4.7">4.7. How do I make nano my
+default editor (in Pine, mutt, etc.)?</a></font></blockquote>
<h2>
<font color="#330000"><a href="#5">5. Internationalization</a></font></h2>
details).</font></blockquote>
<h2>
-<a NAME="4.6"></a>4.6. How do I make nano my default editor (in Pine,
+<a NAME="4.6"></a>I get the message "NumLock glitch detected. Keypad
+will malfunction without NumLock on." What gives?</h2>
+
+<blockquote>
+Nano (actually almost all console editors do) has issues when cycling
+the NumLock key in certain X terminals (rxvt, aterm, wterm, etc...). When
+you switch NumLock on to off, you put the terminal into an "application
+mode" that changes what sequences are sent by the keypad. These sequences
+vary sufficiently from terminal to terminal that it is nearly impossible
+to work around them from within nano.
+<br><br>
+In a nutshell, if you want to be able to use the keypad with the arrow and
+page up/down functionality, you have to exit nano and reset your terminal
+(presumably with "reset" or "stty sane" or similar) and then run nano
+again with NumLock off. If you know an easier way to restore "normal
+mode", please mail <A href="nano@nano-editor.org">nano@nano-editor.org</A>.
+<br> </blockquote>
+
+<h2>
+<a NAME="4.7"></a>4.7. How do I make nano my default editor (in Pine,
mutt, etc)?</h2>
<blockquote>You need to make nano your $EDITOR. If you want this
#endif
}
+/* If the NumLock key has made the keypad gone awry, print an error
+ message, hopefully we can address it later. */
+void print_numlock_warning(void)
+{
+ static int didmsg = 0;
+ if (!didmsg) {
+ statusbar(_("NumLock glitch detected. Keypad will malfunction without NumLock on"));
+ didmsg = 1;
+ }
+}
+
/* This function returns the correct keystroke, given the A,B,C or D
input key. This is a common sequence of many terms which send
Esc-O-[A-D] or Esc-[-[A-D]. */
kbinput = wgetch(edit);
if (kbinput <= 'D' && kbinput >= 'A')
kbinput = ABCD(kbinput);
- if (kbinput <= 'S' && kbinput >= 'P')
+ else if (kbinput <= 'z' && kbinput >= 'j')
+ print_numlock_warning();
+ else if (kbinput <= 'S' && kbinput >= 'P')
kbinput = KEY_F(kbinput - 79);
#ifdef DEBUG
else {