This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
I'd like to have button, set as the default button, respond to either RETURN or SHIFT-RETURN. That is, when the button is in focus, either a return or shift-return operate the button.
As initialized:
0 pressed SPACE
1 released SPACE
After 2 puts:
0 shift pressed SPACE
1 shift released SPACE
2 pressed SPACE
3 released SPACE
as expected, but the button still doesn't respond to shift-return. (It responds OK to return.) I don't see why the InputMap has space, rather than enter or return.
Note the button is the default button on the containing JPanel. It's working properly in that mode.
Is there a correct time to set the InputMap? I'm doing it immediately after button instantiation.