Does anyone know what the reason is for the vanilla number box and the nbx (Number2) have different behaviors with re. to keyboard input:
set. Enter another number press RETURN, new number is set etc. until the numberbox loses "focus".
Try to enter another number, nothing happens. Press RETURN: 0 is set as value.
This has always puzzled me, but there may be a good reason I'm missing.
Thanks, Lorenzo.
probably yes, but I don't know which might be as well. I think I've
pointed that out some time ago, but it's still the same.
Should we make a atom==nbox lobby?
Does anyone know what the reason is for the vanilla number box and the
nbx (Number2) have different behaviors with re. to keyboard input:
- numberbox, Click on number box enter a number press RETURN: number is
set. Enter another number press RETURN, new number is set etc. until the
numberbox loses "focus".
- Number2. Click on Number2, enter number, press RETURN: number is set.
Try to enter another number, nothing happens. Press RETURN: 0 is set as
value.This has always puzzled me, but there may be a good reason I'm missing.
Thanks, Lorenzo.
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management ->
http://lists.puredata.info/listinfo/pd-list
On Mon, 2011-10-17 at 15:16 +0200, João Pais wrote:
probably yes, but I don't know which might be as well. I think I've
pointed that out some time ago, but it's still the same.Should we make a atom==nbox lobby?
Actually, I can't think of a good reason not to be able to edit the numberbox with the keyboard anymore after hitting <enter>. Also setting it to '0' after the second <enter> keystroke does not seem very meaningful (and is quite annoying when playing 'live').
If it's not a feature, it's a bug, no?
Roman
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).
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
On 17/10/2011 15:48, Mathieu Bouchard wrote:
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»
Honestly I would think something like <escape> would. But I guess there is a subjective aspect to that (thinking for e.g. at programmes like Inkscape or Rosegarden).
Lorenzo.
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).
But on a numberbox? Or do you mean patch-wise, in this case inlets/outlets of *which* object?
Lorenzo.
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
Le 2011-10-17 à 16:07:00, Lorenzo Sutton a écrit :
On 17/10/2011 15:48, Mathieu Bouchard wrote:
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).
But on a numberbox? Or do you mean patch-wise, in this case inlets/outlets of *which* object?
I mean numberboxes' keyboard shortcuts should have limited scope such that people can define patch-wide shortcuts that work without having to press Escape after every Enter in a numberbox.
It doesn't matter if you don't want those keyboard shortcuts. This is why Miller's Pd has been free of any concern for releasing numberbox focus.
Another shortcut could be used instead of Enter to get the current behaviour, for people who need it.
But as Jonathan said, this only happen if you edit a numberbox' contents from edit mode. That's possible, but it's also rare.
| Mathieu BOUCHARD ----- téléphone : +1.514.383.3801 ----- Montréal, QC
----- 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
Le 2011-10-17 à 09:37:00, Jonathan Wilkes a écrit :
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.
Sorry, you're mostly right. I hadn't woken up yet.
But note that Ctrl+click in Edit mode does give the focus to a numberbox for edition, and then the numberbox does not give up focus on return.
| Mathieu BOUCHARD ----- téléphone : +1.514.383.3801 ----- Montréal, QC
----- Original Message -----
From: Mathieu Bouchard matju@artengine.ca To: Jonathan Wilkes jancsika@yahoo.com Cc: Roman Haefeli reduzent@gmail.com; "pd-list@iem.at" pd-list@iem.at Sent: Monday, October 17, 2011 12:53 PM Subject: Re: [PD] Reason for different keyboard behavior of vanilla numberbox and nbx (Number2)
Le 2011-10-17 à 09:37:00, Jonathan Wilkes a écrit :
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.
Sorry, you're mostly right. I hadn't woken up yet.
But note that Ctrl+click in Edit mode does give the focus to a numberbox for edition, and then the numberbox does not give up focus on return.
Hmmm...
I think that's fine, because that is quite simply the behavior of numberbox. Just because the user entered the numberbox through a transient "Run mode" with <ctrl-click> doesn't mean that the user only wants to enter only one value.
It would be the same for an object that was a Pd-ish implementation of a tk entry widget. In "Edit mode" if you control-click the text area of the entry widget, it should give you a cursor and let you enter text, and do whatever it does when you click <Return>, because that's the "Run mode" behavior for that object.
If Pd started to have a large collection of GUI user input/edition objects which use <Return> as part of the input, it might be nice to add a standard key-binding to give up that object's "Run mode" focus. (Maybe <ESC>?)
-Jonathan
| Mathieu BOUCHARD ----- téléphone : +1.514.383.3801 ----- Montréal, QC