Files
nethack/dat
nethack.rankin 2f1813cdd8 altmeta Alt key hack, mainly for unix (trunk only)
Some time ago we received a patch submission which attempted to
handle the Alt key for terminals or emulators which transmit two char
sequence "ESC c" when Alt+c is pressed, but I can't find it.  I don't
remember the details but recall that it had at least once significant
problem (perhaps just that it was unconditional, although it may have
been implemented in a way which interferred with using ESC to cancel).

     This patch reimplements the desired fix, making the new behavior be
conditional on a boolean option:  altmeta.  That option already exists
for the Amiga port, where it deals with low-level keyboard handling but
essentially affects the same thing:  whether Alt+key can be used as a
shortcut for various extended commands.  This one affects how the core
processes commands, and is only available if ALTMETA is defined at
compile time.  I've defined that for Unix and VMS; other ports don't
seem to need it.  (I'm not sure whether "options" created by makedefs
ought to mention it.  So far, it doesn't since this isn't something
users are expected to tweak.  The setting of the non-Amiga altmeta
option doesn't get saved and restored, so won't affect saved data if
someone does toggle ALTMETA and then rebuild.)

     When [non-Amiga] altmeta is set, nethack's core will give special
handling to ESC, but only during top level command processing.  If ESC
is seen while reading a command, it will be consumed and then the next
character seen will have its meta bit set.  This introduces a potential
problem:  typing ESC as a command will result in waiting for another
character instead of reporting that that isn't a valid command.  Since it
isn't a valid command, this shouldn't be a big deal, but starting a count
intended to prefix your next command and then typing ESC after deciding
to abort that count runs into the same situation:  nethack will wait for
another character to complete the two character sequence expected for
"ESC c".  There's not much that can be done with this, other than have
the Guidebook mention that an extra ESC is needed to cancel the pending
count, because digits followed by ESC could actually be a numeric prefix
for Alt+something rather than an attempt to abort the count.
2011-04-19 02:02:11 +00:00
..
2009-05-06 10:45:32 +00:00
2009-05-06 10:45:32 +00:00
2009-05-06 10:45:32 +00:00
2009-05-06 10:45:32 +00:00
2009-05-06 10:45:32 +00:00
2009-05-06 10:45:32 +00:00
2009-05-06 10:45:32 +00:00
2009-05-06 10:45:32 +00:00
2009-05-06 10:45:32 +00:00
2009-05-06 10:45:32 +00:00
2009-05-06 10:45:32 +00:00
2002-01-05 21:05:46 +00:00
2009-05-06 10:45:32 +00:00
2009-05-06 10:45:32 +00:00
2009-05-06 10:45:32 +00:00
2009-05-06 10:45:32 +00:00
2003-09-18 03:03:12 +00:00
2009-05-06 10:45:32 +00:00
2009-05-06 10:45:32 +00:00
2009-05-06 10:45:32 +00:00
2009-05-06 10:45:32 +00:00
2003-09-18 03:03:12 +00:00
2009-05-06 10:45:32 +00:00
2009-05-06 10:45:32 +00:00
2006-10-17 23:55:42 +00:00
2009-05-06 10:45:32 +00:00
2009-05-06 10:45:32 +00:00
2009-05-06 10:45:32 +00:00
2009-05-06 10:45:32 +00:00
2006-04-01 05:48:55 +00:00
2009-05-06 10:45:32 +00:00