-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a third drag speed to KeyboardDragListener #1601
Comments
pageDragVelocity
, to KeyboardDragListenerpageDragVelocity
, to KeyboardDragListener
pageDragVelocity
, to KeyboardDragListener
In #1603, it's noted that |
I also like renaming to "speed". I'm very happy to talk through adding a third possible speed to keyboard drag listener. That seems like an improvement, especially if there is a sim that is desiring that design. I'm a bit confused about what the interaction would be for the third speed. Yes there is a third case in sliders where you can jump in ~1/10 the range with page keys, but as you said that doesn't map too well into 2-d dragging. We have arrow keys and shift+arrow keys, but what would the third speed be triggered by? Holding pageup/down as a modifier key to the arrow keys doesn't really make a lot of sense to me. Perhaps ctrl+arrow keys, but I have no idea about the ramifications of that. To me it is a question for the designers of FEL. I don't think it is on @jessegreenberg and I to decide on what the keys should be. In terms of the effort of adding this feature. I don't think it a quick and dirty addition of the feature would be too hard as it would be easy enough to follow the pattern used by the
|
Adding a third speed for KeyboardDragListener seems reasonable. As described above we should identify which modifier key we should use. "Page" isn't a modifier key it is a specific key press often assigned to arrow keys when the function key is pressed. @pixelzoom will follow up with the design team. |
I asked about accessibility guidelines/conventions for use of modifier keys at dev meeting today, and no one was aware of general guideline. Shift was apparently used in AccessibleSlider for "smaller increment" because that the HTML convention for something with role "slider". I investigated what Microsoft, Apple, and ARIA have to say about modifier keys. Microsoft's Guidelines for Keyboard User Interface Design says this about modifier keys:
Apple's macOS HIG has this to say about modifier keys in design for Keyboards:
That last point for macOS is worth noting -- Apple recommends avoiding the Control modifier. Finally... ARIA's Best Practices for Developing a Keyboard Interface has no relevant recommendations for the use of modifier keys. It only describes the focus behavior of Shift+Tab, and includes a table of key assignments for common function. |
Next step is to identify the desired modifier key, to be used with the arrow keys for "drag faster". I did some research (see the previous comment) and came to no conclusion. @zepumph and @jessegreenberg felt that the choice of key should be a designer's call. Since we'd like this feature in FEL, I'll assign to @arouinfar. |
Is it possible to use I would like to avoid multi-key modifiers as much as possible, so something like page up/down won't work because keys are accessed with fn+left/right on most laptops. Maybe |
I'm not familiar with what has been done in other sims (or common code) so I can't recommend a modifier key for this. @jessegreenberg or @zepumph are probably more familiar with prior work. What do you suggest for the "drag faster" modifier key? |
I do not know if we have any precedent in the project for using "ctrl" on windows and "cmd" on mac, even though that is clearly a reasonable path. In fact, in studio we awkwardly are using just the ctrl, which I believe is awkward on a mac since it isn't the cmd key: I'll let @jessegreenberg weigh in a bit more. |
We do that for zoom commands to mimic default browser behavior. But "cmd + arrow keys" is the native Mac command to go forward/backward a page. If we use that here we would have to prevent that default behavior. Do we need @terracoda do you have any opinions about this issue? |
I am not opposed to adding a third speed, but we originally chose the shift key as a second option for step size because that's how sliders work. We can't port pageUp/Down as easily because these keys do not exist on every keyboard. I am wondering if what we want is an option for more than one additional speed rather than a random new modifier key. |
I very much agree! This has been a problem every time I've need to add hotkeys to a sim. And we've been kicking that can down the road for almost 2 years. phetsims/phet-info#211 was broken out of #1445, which was broken out of phetsims/phet-info#188 where I said:
|
To answer a couple of @terracoda's questions:
Yes.
|
@terracoda asked:
I'm not sure if I understand the question, so ask again if I'm not answering it. If you're asking what the FEL bar magnet is using for alt input... All draggable objects (including the bar magnet) are using KeyboardDragListener, with values for |
Ok, I need to retract a couple of things I said.
Given that, I feel the f-key is a good modifier for a "faster" quasimode, i.e. bigger steps. The f-key is a marked home key on QWERTY keyboards, and is a good mnemonic, at least in the English language, for "faster" speed or faster/bigger steps. It might be nice to have a bit of design meeting time to openly discuss this idea. Implementing the f-key would not exclude using keys like 1-2-3 for interactions where experimenting with controlled velocities is important, like in FL and FEL. |
Thanks @pixelzoom, for your explanation in #1601 (comment) Edited to add "NOT". |
So to summarize, I am proposing we add the f-key as a third speed, so KeyboardDragListener can have:
|
I'm familiar with using letters as shortcuts -- Sasha Maximova's article that you referred to recommends letters as a way of avoiding OS/browser conflicts. But I'm not familiar with using letters as modifier keys, which are typically held down. Is there a precedent for that? |
I am fine with @terracoda's proposal to use the F-key as a modifier for fast speed. That said, this feature is not required for FEL. The design team thought it could be a useful feature, broadly speaking, so we asked @pixelzoom to create this issue. However, the learning goals for FEL are satisfied with the 2 existing drag speeds in KeyboardDragListener. |
@pixelzoom, using letter keys as modifiers is not new. I did it my first sim, Balloons and Static Electricity, to avoid conflicts with screen reader software shortcuts. Also Sasha Maximova suggests pairing letter keys as well. For us we’ll be pairing f with arrow keys and f with WASD keys. |
Apologies for continuing this discussion, but trying to educate myself about conventions for modifier keys. @terracoda said:
Can you elaborate on what you mean by "pairing"? Will 'f' be held down, while arrow/WASD keys are pressed. If not, that will be different that Shift. If so, it does not seem to match Sasha's recommendations for arrow keys. I've read J, K, or How to choose keyboard shortcuts for web applications as you recommended. Can you point me to where Sasha suggests using a letter as a modifier, to be held down while a second key is pressed? What I find in the article is quite the opposite -- she recommends that letter keys should NOT be held down, but should be pressed/released in a sequence, with a delay between them. For two letter shortcuts, the first letter should access the feature/action, while the second letter should be the restriction (modifier) of that feature/action.
How does our proposed use of f-arrow and f-WASD match Sasha's recommendation? |
Thanks @pixelzoom, good point, but the examples in the articles for 2 consecutive key presses are for a completely different category of interaction. Pressing a letter to bring up a comment box or menu, then doing something else. We need an intuitive way to move an object at a different speed or step size in any direction. I am building off my research and design experience with BASE, and with what we already have for the slower speed. I think I even tried j-key, then location key, but I do not remember at this point. For BASE, the j-key as a modifier key to enter a quasimode for jumping and adding a second key for the location of the jump was VERY intuitive and memorable for learners using BASE. Example from BASE for reference: Now for custom dragging... A quasimode is harder for people with limited dexterity, that's why the 1-2-3 shortcuts are really handy for certain interaction scenarios, like the Bar Magnet in FL. Using the f-key as modifier rather than a single shortcut to make a bigger step should avoid conflicts with other software that might use the f-key as some other shortcut. Quoting from the article:
I feel, the j-key in BASE started a PhET convention. The article also says a lot of other things like documentation is important. That is currently lacking and part of another open issue. If we need to discuss this more, we should do it in design meeting tomorrow. |
Thanks for the clarification @terracoda. In #1601 (comment), @arouinfar said:
@arouinfar and I discussed this issue in our standup meeting this morning. Since this feature is not needed for FEL, or any other sim in development, we're going to label this issue as deferred. If another team needs this feature, they can resume the discussion and decide how/whether to implement. |
Given how this issue had great discussion, and a reasonable potential path forward, but wasn't adopted, I think the best path forward is to close this issue. When there is a need for a third speed. We will still be able to find this issue and recall this discussion. To me it comes down to the value added vs the challenge to learn a new input combo. I think it is unlikely that a third drag speed will be that valuable in the near future. |
In phetsims/faradays-electromagnetic-lab#54 (comment), there is a request to have 3 speeds for moving Nodes via the keyboard. KeyboardDragListener currently only supports 2 speeds, via options
dragVelocity
andshiftDragVelocity
.AccessibleValueHandler (e.g. Slider) supports 3 drag speeds via options
keyboardStep
,shiftKeyboardStep
, andpageKeyboardStep
. So there is prescedent for 3 speeds.Questions:
(1) Would it be possible to add a third drag speed to KeyboardDragListener? Estimate of effort?
(2) Using the same naming schema as AccessibleValueHandler, should it be named
pageDragVelocity
, and by convention be faster thandragVelocity
?(3) Would "page" work for 2D dragging, which requires all 4 arrow keys, or would some other modifer be more usable?
I'll start by assigning to the authors of KeyboardDragListener.
@arouinfar @kathy-phet @ariel-phet FYI.
The text was updated successfully, but these errors were encountered: