pinentry ignores backspace #40335
Comments
Sounds like something that should be reported to the pinentry authors rather than Homebrew? |
Is this problem still occurring in the newly-released 0.9.3 was full of little problems, if the gnupg-dev mailing list is any indication. |
This still happens on 0.9.4. |
I can confirm. Has anyone reported it upstream? As another data point, I noticed there is no backspace problem with their newly-included (Homebrew doesn't enable that in the formula; unconnected with the present issue, I'm thinking about making a PR to add it). |
Well this is weird. I can confirm the bug also on the curses mode of |
Ping. If nobody has reported it yet, I will, but I don't want to issue a duplicate report. |
@chdiza That'd be great, thanks! |
Done. |
OK, after lots of pain, this has been fixed in upstream's git repo. It is not yet in a release. I also asked if they'd cut a release quickly to help out OSX users. Turns out, backspace (what's labeled "delete" on Mac keyboarads near their northeast corners) has NEVER worked in pinentry on OSX. In the meantime, you can just use Ctrl-h instead of backspace/delete. Maintainers: we can also (untested but should work) apply the patch, and then remove it at next release. Shall I make a PR now, or wait to see if they cut a release tomorrow? EDIT: I'll just make a PR. diff --git a/pinentry/pinentry-curses.c b/pinentry/pinentry-curses.c
index 235435a..784c770 100644
--- a/pinentry/pinentry-curses.c
+++ b/pinentry/pinentry-curses.c
@@ -705,7 +705,11 @@ dialog_input (dialog_t diag, int alt, int chr)
switch (chr)
{
case KEY_BACKSPACE:
- case 'h' - 'a' + 1: /* control-h. */
+ /* control-h. */
+ case 'h' - 'a' + 1:
+ /* ASCII DEL. What Mac OS X apparently emits when the "delete"
+ (backspace) key is pressed. */
+ case 127:
if (diag->pin_len > 0)
{
diag->pin_len--; Also, be aware that when the next release lands we're going to have to add another |
Thank you for fixing that bug! I confirm that Delete on the native keyboard and Backspace on an external USB keyboard erase the preceding character. To compile pinentry, I checked it out from |
pinentry (the curses version) ignores backspace. The backspace key sends code 0x7f both in iTerm and in Terminal.app. Ctrl-H works, but it's not intuitive. Users may have trouble fixing errors in the password.
The text was updated successfully, but these errors were encountered: