From: Benno Schulenberg Date: Thu, 11 Jun 2015 19:01:28 +0000 (+0000) Subject: Making it easy to see what codes a key stroke produces when debugging. X-Git-Tag: v2.4.2~32 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=e00b3e85876b6a0cf09d83375631e3c5bdf8ee0b;p=nano.git Making it easy to see what codes a key stroke produces when debugging. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5245 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/ChangeLog b/ChangeLog index cc00845c..8fba2d56 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2015-06-11 Benno Schulenberg + * src/winio.c (get_key_buffer): Add some debugging code to make it + easy to see what codes a key stroke produces. + 2015-06-07 Benno Schulenberg * doc/texinfo/nano.texi: Show the node with the command-line options in the main menu, to make it easy to find. diff --git a/src/winio.c b/src/winio.c index d94a5bab..2e56bbf7 100644 --- a/src/winio.c +++ b/src/winio.c @@ -181,7 +181,13 @@ void get_key_buffer(WINDOW *win) nodelay(win, FALSE); #ifdef DEBUG - fprintf(stderr, "get_key_buffer(): key_buffer_len = %lu\n", (unsigned long)key_buffer_len); + { + size_t i; + fprintf(stderr, "get_key_buffer(): the series of codes:"); + for (i = 0; i < key_buffer_len; i++) + fprintf(stderr, " %3x", key_buffer[i]); + fprintf(stderr, "\n"); + } #endif }