dialog exits with code 255 when typing numbers with numpad
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
dialog exits with code 255 when typing numbers with numpad
Everywhere I checked, I can read that dialog exits with status 255 when the [Esc] key is pressed. This is correct here too. However, in addition to the [Esc] key, all Numpad keys but [/],[*], [-] and [Enter] close dialog with return code 255.
Try this:
Code:
dialog --inputbox text 10 40
echo $?
Type in any text; whenever you use one of 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, . or + (from the numpad), the dialog closes and the echo $? will show the exit status "255". This is extremely nasty since it's hard to make my users understand that the numpad numbers are taboo when typing in the application. Also, there's no way to trap them since they return the same code like escape.
Is this a known bug, an undocumented feature? and how to get around it?
Tinkster, this is interesting. I'm having the problem on RHEL4 and RHEL5. What version of dialog do you have?
RHEL4: cdialog (ComeOn Dialog!) version 1.0-20040731
RHEL5: cdialog (ComeOn Dialog!) version 1.0-20051107
Or maybe the keyboard is the problem?
Yes, of course, my NumLock is enabled. I've been able to research this a little bit further and noticed that the problem is coming from the ssh client Putty on windows. I've tried several different keyboard settings but none would work as expected.
When directly logging on the machine, the numbers work well, but it closes with return 255 when pressing any of /*-+.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.