Index: b/pinentry/pinentry-curses.c =================================================================== --- b/pinentry/pinentry-curses.c +++ b/pinentry/pinentry-curses.c @@ -690,6 +690,8 @@ return 0; } +static FILE *debugfp; + /* XXX Assume that field width is at least > 5. */ static void dialog_input (dialog_t diag, int alt, int chr) @@ -702,6 +704,14 @@ /* Remap alt-backspace to control-W. */ chr = 'w' - 'a' + 1; + if (! debugfp) + debugfp = fopen("/tmp/pinentry-curses-output.txt", "w"); + if (debugfp) + { + fprintf (debugfp, "%x\n", chr); + fflush (debugfp); + } + switch (chr) { case KEY_BACKSPACE: