----- Original Message -----
From: Mathieu Bouchard matju@artengine.ca To: Roman Haefeli reduzent@gmail.com Cc: pd-list@iem.at Sent: Monday, October 17, 2011 9:48 AM Subject: Re: [PD] Reason for different keyboard behavior of vanilla numberbox and nbx (Number2)
Le 2011-10-17 à 15:34:00, Roman Haefeli a écrit :
Actually, I can't think of a good reason not to be able to edit the numberbox with the keyboard anymore after hitting <enter>.
You mean the opposite of that, right ?
BTW, this numberbox behaviour can interfere with keyboard-based patch edition schemes because <Return> would be assumed to mean «give up focus» so that people can use digits and other things (the letter e...) in keyboard commands about the patch (e.g. Jonathan's suggestion of using digits as shortcuts to select inlets/outlets by their index).
We are talking about "Run mode" behavior for numberbox, and in "Run mode" <Return> doesn't mean "give up focus". So there's no problem.
Furthermore, my keyboard commands wouldn't fire in runmode. If you're building a patch using the mouse it's nice to be able to hit <ctrl-1> to create an object regardless of the mode, but if you're patching predominantly using my keyboard commands it's better to explicitly set mode beforehand using <ctrl-e>, so that the user can set whatever keyboard triggers they want in "Run mode" using [key], [keyup], etc., without having "Edit mode" behaviors happen by accident. It's a small price to pay, especially assuming that the keyboard command user will spend more time in home row building the patch before the mouse is needed (and one can still switch between keyboard "Edit mode" entry and "Run mode" patch testing w/mouse by using <ctrl-click>).
-Jonathan
PS: I say <Return> because <Enter> means something else in Tk (what is often called a mouseover event).
| Mathieu BOUCHARD ----- téléphone : +1.514.383.3801 ----- Montréal, QC _______________________________________________ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list