vikach / svg-edit

Automatically exported from code.google.com/p/svg-edit
0 stars 0 forks source link

Allow selection of next child/previous child with a key (e.g. [ and ] ) #102

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Sometimes it is hard to select small objects when many are stacked
2. So far, we only have "on top" or "at the bottom".

What is the expected output? 
Being able to select each object in the DOM with a key would be nice

Original issue reported on code.google.com by worms_...@yahoo.com on 19 Aug 2009 at 1:48

GoogleCodeExporter commented 9 years ago
Note that we can't really use tab/shift-tab because the browser uses that for 
form
navigation (particularly when the contextual panel is populated).  I'm open to 
other
keyboard shortcut suggestions.

If [ and ] are the keys we use then:

1) Pressing [ in the editor should:  a) if nothing is selected, select the
bottom-most element (first element child), b) else, move selection to the next
element child if it's non-null

2) Pressing ] in the editor should:  a) if nothing is selected, select the 
top-most
element (last element child before selectorParentGroup), b) else, move 
selection to
the previous element child if it's non-null

3) Create SvgCanvas API functions to moveNext and movePrev.  moveNext/movePrev 
must:

- determine the next/prev element
- invoke clearSelection()
- invoke addToSelection()
- invoke call("selected", selectedElements)

Original comment by codedr...@gmail.com on 19 Aug 2009 at 2:26

GoogleCodeExporter commented 9 years ago
Note that we can't really use tab/shift-tab because the browser uses that for 
form
navigation (particularly when the contextual panel is populated).  I'm open to 
other
keyboard shortcut suggestions.

If [ and ] are the keys we use then:

1) Pressing [ in the editor should:  a) if nothing is selected, select the
bottom-most element (first element child), b) else, move selection to the next
element child if it's non-null

2) Pressing ] in the editor should:  a) if nothing is selected, select the 
top-most
element (last element child before selectorParentGroup), b) else, move 
selection to
the previous element child if it's non-null

3) Create SvgCanvas API functions to moveNext and movePrev.  moveNext/movePrev 
must:

- determine the next/prev element
- invoke clearSelection()
- invoke addToSelection()
- invoke call("selected", selectedElements)

Original comment by codedr...@gmail.com on 19 Aug 2009 at 2:26

GoogleCodeExporter commented 9 years ago

Original comment by codedr...@gmail.com on 19 Aug 2009 at 2:31

GoogleCodeExporter commented 9 years ago
Note that entering [ and ] requires two keypresses on many keyboards. It would 
be 
cool if the keybindings were configurable.

Original comment by erik.dah...@gmail.com on 19 Aug 2009 at 6:15

GoogleCodeExporter commented 9 years ago
Thanks Erik, I didn't know that (all the keyboards I own have dedicated keys 
for [
and ]).

Would shift-up/-down be better?

I agree that ultimately keystrokes should be configurable, but I don't think 
we're
there yet, unless you want to write a proposal or submit a patch.  Questions 
for that
would be how are they stored (cookies?), how this can be handled in a 
cross-browser,
cross-platform way.

Original comment by codedr...@gmail.com on 19 Aug 2009 at 6:23

GoogleCodeExporter commented 9 years ago

Original comment by adeve...@gmail.com on 20 Aug 2009 at 8:31

GoogleCodeExporter commented 9 years ago
Fixed in r430. Currently using Shift+9 for previous element and Shift+0 for next
element. I believe it works as discussed here, but may need some testing.

Original comment by adeve...@gmail.com on 21 Aug 2009 at 1:43

GoogleCodeExporter commented 9 years ago
Well, I don't know how I missed that, but apparently, Shift+0 and Shift+9 do 
not work
in Opera 10 beta 3 on Windows XP.

I went back to r430 and it doesn't work, whereas it works like a charm in 
Firefox.

Original comment by worms_...@yahoo.com on 24 Aug 2009 at 10:35

GoogleCodeExporter commented 9 years ago
They do work in Opera 9.60 on Xubuntu (as of r461. That's probably how I missed 
it on XP.

Original comment by worms_...@yahoo.com on 24 Aug 2009 at 10:51

GoogleCodeExporter commented 9 years ago
reopened - see next comment

Original comment by rusn...@gmail.com on 25 Aug 2009 at 6:34

GoogleCodeExporter commented 9 years ago
Fixing on Opera 10 beta 3/ Windows XP is necessary, I think (see also comment8 
and
comment9.

Original comment by worms_...@yahoo.com on 25 Aug 2009 at 6:37

GoogleCodeExporter commented 9 years ago
Hmm, it works on Opera 10 RC1 on Windows XP for me (just downloaded today). Can 
anyone confirm? Also, if it doesn't work, do the other shortcuts work? (i.e. 
Shift+4 
to select the Square tool)

Original comment by adeve...@gmail.com on 25 Aug 2009 at 12:25

GoogleCodeExporter commented 9 years ago
I downloaded and installed Opera 10 RC1 on Windows XP SP1, and I confirm that 
SHIFT+0
or 9 doesn't work.

I went to the Opera Irc channel and explained the situation (French laptop 
keyboard,
and for Opera, it works on Linux, but not on Windows), and here is what the 
guys said:

ME:   what baffles me is the another browser which i won't mention, but which 
name
begins with a F and ends with an X, works with the same laptop when i do 
Shift+number
(as if i was just willing to type a number)
THEM:   opera might be listening to the key being pressed instead of the character
being processed
or vice-versa
ME: ah
(even more baffled)

So I guess this is the problem... but I'm unable to explain it more and to make 
the
shift+0/9 work on this machine, at this point :-(

Original comment by worms_...@yahoo.com on 25 Aug 2009 at 3:17

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Q: Also, if it doesn't work, do the other shortcuts work? (i.e. Shift+4 
to select the Square tool)

A: No, they don't!

What works to obtain the tools, on the laptop is :
Press Numlock (upper top row of key, "Verr Num" key)
Use Fn+ 1-9 (blue numbers on the "numeric keys", 1 is on the J key, 2 is on the 
K, etc.)

But this still doesn't give Shift+0/9

Original comment by worms_...@yahoo.com on 25 Aug 2009 at 5:16

GoogleCodeExporter commented 9 years ago
Fixed by changing to Shift+o and Shift+p in r470.

Original comment by adeve...@gmail.com on 26 Aug 2009 at 12:13