[PATCH] tty: Treat enter key as synonymous with OK.
Felix Crux
felixc at felixcrux.com
Mon Dec 19 01:11:04 CET 2016
* tty/pinentry-tty.c: Accept '\n' as equivalent to designated 'ok' key.
--
This is a convenience that is analogous to the 'OK' button having
keyboard focus by default in GUI versions of pinentry.
Signed-off-by: Felix Crux <felixc at felixcrux.com>
---
tty/pinentry-tty.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tty/pinentry-tty.c b/tty/pinentry-tty.c
index a509d79..a87a1eb 100644
--- a/tty/pinentry-tty.c
+++ b/tty/pinentry-tty.c
@@ -273,7 +273,7 @@ confirm (pinentry_t pinentry, FILE *ttyfi, FILE *ttyfo)
ret = 0;
break;
}
- else if (ok && input == ok)
+ else if (ok && (input == ok || input == '\n'))
{
ret = 1;
break;
--
2.1.4
More information about the Gnupg-devel
mailing list