I'm grabbing an ISBN from the user. Probably from a barcode scanner (EAN 18 digits terminated by Return) but it may be keyed in by hand (13 digits). If it is by hand, it'll come from the number pad and may end with "Number Pad Enter". I've added a bind to my code:
$isbn_entry->bind("<Return>", sub{shift->focusNext});
Which works properly when the enter key on the keyboard is pressed, but not when the enter key on the number pad is pressed. Do I have to add another bind to catch that one, too? If so, how? Or have I done this wrong to start with?
<KP_Enter>
should correspond to the numeric keypad enter. You can bind it the same way as Return
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With