LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   dialog exits with code 255 when typing numbers with numpad (http://www.linuxquestions.org/questions/linux-general-1/dialog-exits-with-code-255-when-typing-numbers-with-numpad-566514/)

ricky_ds 07-04-2007 02:52 AM

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 07-04-2007 08:20 PM

Works in slackware ... unless the numLock key isn't pressed.
But then you wouldn't get numbers, either....


Cheers,
Tink

ricky_ds 07-05-2007 01:06 AM

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?

Tinkster 07-05-2007 03:17 PM

$ dialog --version
Version: 1.0-20060126


But is *your* NumLock enabled?


Cheers,
Tink

ricky_ds 07-06-2007 12:48 AM

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 /*-+.


All times are GMT -5. The time now is 11:33 AM.