The two threads of recent days, in particular about the cross to add a new node, are expressing an underlying frustration about the remaining modes in JOSM. The cross is a bit of a hack to work round this. Can we do more to get rid of the modes? Is re-learning gestures to achieve this worthwhile?
It is fairly easy to see how one could use combinations of clicks and modifiers to achieve this, but you don't want to have to keep a finger on a modifier key when extending ways - it gets very tedious. So we want to have CLICK do two different things at different times, but don't want modes. Hmm. Recognising that we are limited by the number of mouse buttons and modifier keys, another approach might be to use a pop up menu to offer multiple possibilities. But that gets tedious too, and is more suited to new users. Or we could substitute mouse clicks with keyboard keys - so for example you'd position the mouse where you want it and say click to select, but press E to extend a way, N to add a node without extension, e to extend without snapping to an existing point/way, n ditto for N and so on. In effect the keyboard becomes a plethora of mouse buttons. But that is a radically unconventional UI. So here's a third possibility, the remainder of this long mail: use context, so you barely notice, and don't normally have to press a key or button to switch a mode. Most of what follows will be pretty familiar, with only a few changes to current behaviour, though I spelled out everything (E&OE). Only a CLICK is ambiguous. In that case only there's an implicit mode. Left button deals with data, right button with viewing. RIGHT-DRAG pans (as now) and SHIFT+RIGHT-DRAG rubber band rectangle zooms (like DRAG in zoom mode now). That removes the need for a zoom mode. We also have the possibility of zooming in by some factor on simple right click centred on the cursor. Of course mostly you continue to use scroll wheel. CLICK on a target object normally selects it, replacing any existing selection, but see below. SHIFT+CLICK adds the target to those selected already, but like most applications (but unlike now) also removes the target from the selection if it is already selected (so CTRL+CLICK no longer has this function). DRAG from one point to another selects objects in the dragged rectangle; SHIFT+DRAG adds enclosed objects to those already selected, both as now. However, if the immediately preceding operation (ignoring any zooms and pans) was a selection (any of the above) or a drawing operation (CLICK, CTRL+CLICK, ALT+CLICK, ALT+SHIFT+CLICK - see below), CLICK changes its behaviour: it extends a way (pretty much as Draw mode does now, and providing a way, or a node, or a way+end node of that way is selected - see below). It snaps the way to a node if you click on a node, as now, and inserts the new node in a way if you click on a way, as now. Furthermore, CLICK in a blank area always extends as above (deselection is therefore only by Deselect All or press 'U'), so only the snap case is ambiguous. In most cases, this is what you want, but sometimes you want the other interpretation (draw not select or vice-versa). SHIFT+CTRL+CLICK does what CLICK would do in the other case, and/or ESC can toggle. CTRL+CLICK always adds a new node without extending (this used to be SHIFT+CLICK, but SHIFT+CLICK is so universally used for selection extension, I think that should be its assignment). If over a way, we snap the node into the way. If near an existing node do nothing/say so (or, possibly, just select the node). If nothing is selected to start with, CLICK in a blank area does the same as CTRL+CLICK, i.e. just add a new node. ALT modifies to not snap. So ALT+CLICK extends and always creates a new node, never part of an existing way, and ALT+CTRL+CLICK always creates a new node. ALT+CLICK is unambiguous so doesn't need to be preceded by selection. DEL or D deletes selected objects. There is no need for a delete mode. DRAG moves the selected objects, also selecting the target if not already selected, exactly as now, but with no need to be in a mode. CTRL+SHIFT+DRAG rotates the selection, ditto (it could be just CTRL+DRAG, but it's CTRL+SHIFT+DRAG already). ALT+DRAG extrudes, ditto. Currently you can make a new way from the selected node to the target with ALT+CLICK (which I've usurped to suppress snapping). Here's what I would do for this. Firstly the extension rules: - if only a single node is selected, a new way is created by a CLICK from that node to the target position (either creating a new node, possibly also snapping into an existing way, or snapping to an existing node). - if only a single way is selected, the way is extended to the new/target node. This would most usefully be from the nearest end to the target click. - if a single way _and_ one of its endpoint nodes is selected, this forces the end extended from. - any other selection is invalid. This could mean do nothing, display a message, and/or possibly - the whole way extended or created and the new node (or snapped to node) end up selected. So, to create new way rather than extending an existing one, you just select a node. If you want to extend a way, you select the way (and possibly also an end node if you want). If you just created a way and want to start a new one on the end of it, you SHIFT+CLICK the way just created (which deselects it, but leaves the end node selected) and then CLICK. The awkward cases are, of course, where you expect CLICK to do one thing and it does the other. The rubber band lines and cursor should be telling you what will happen. - you select something, and, realising you selected the wrong thing, you immediately try to select something else. This in fact creates a way instead. - you are inspecting objects, so selecting them but not then doing any more gestures, simply looking at the information in the panels. This is the same case as above, but deliberate. In the these cases, ESC could toggle the "draw" interpretation of click-and-snap, though, yes, you have to remember to do it. Also, there is the unused combination SHIFT+CTRL+CLICK which could be used to do a simple selection when CLICK would otherwise draw and vice-versa. - you've finished adding tags, and you want to extend the way you just tagged to link to an existing way or node, but the click actually selects the target way or node (the snap case is thee only one that is affected - a simple extension into blank space does what you want). Solution is to click the already selected way, or press ESC first, or SHIFT+CTRL+CLICK. In essence this is trading the convenience of the double interpretation of a CLICK for these cases. I think that then leaves only these cases: - alignment of WMS layer. I think this should be done with a pan gesture with the WMS layer selected. (And selecting the WMS layer shouldn't obscure the other layers!) - moving the audio play head. This needn't change. Incidentally, the equivalent of the cross would be to CTRL+CLICK on a way, in all cases, but of course it can be anywhere on the way. David _______________________________________________ josm-dev mailing list [email protected] http://lists.openstreetmap.org/listinfo/josm-dev
