Perl Tk Bind <Return> Doesn't the number pad return?

I grab ISBN from user. Probably from a barcode scanner (EAN 18 digits completed by return), but it can be entered manually (13 digits). If it is manual, it will come from the numeric keypad and the β€œNumber Entry” may end. I added a binding to my code:

$isbn_entry->bind("<Return>", sub{shift->focusNext}); 

Which works correctly when you press the enter key on the keyboard, but not when you press the enter key on the numeric keypad. Do I have to add another snap to catch it? If so, how? Or did I do it wrong to get started?

+6
source share
1 answer

<KP_Enter> must match the numeric keypad input. You can bind it the same way as Return .

+9
source

Source: https://habr.com/ru/post/918509/


All Articles