Version 2 (modified by 9 years ago) ( diff ) | ,
---|
Common Keyboard Shortcuts
Adds single-key shortcuts for commonly-used tags (roads, buildings, huts, landuse).
Examples of workflows after the shortcuts have been added.
- Draw non-rectangular buildings, press 'q' to square the corners, press 'd' to set 'building=yes'.
- Draw two points defining the diameter of a round hut, press Shift-'o' to create the circle, press 'h' to set 'building=hut'.
- Draw a road, press 't' to set 'highway=residential'.
- Draw a polygon around a small settlement, press 'k' to set 'landuse=residential'
All of the most common road types* are available in this preset, though major roads are usually already drawn. Unclassified, residential, track, service and path are probably the most useful to hotkey, especially for HOT mapping.
(* e.g. highway types listed here: http://wiki.openstreetmap.org/wiki/Highway_Tag_Africa)
Setup
Note: All three of the following steps need to be performed for single-key shortcuts to work.
- Adding the presets to the JOSM Menu
- In JOSM Preferences, open the Map Settings-Tagging Presets dialog. (Currently third icon from the top in the left column, then the third tab.)
- Find 'Common Keyboard Shortcuts' in the Available Presets list on the left. Click '>' to add it to the 'Active presets' list.
- Press OK, then when prompted, restart JOSM. ‘Common Keyboard Shortcuts’ should now appear under ‘Presets’.
- Adding the presets to the JOSM Toolbar
- In JOSM-Preferences, open the Toolbar-Preferences dialog. (Currently fifth icon from the top in the left column).
- In the Available pane, open the Presets folder, select a preset, and click the ‘<‘ button to add it to the toolbar. Suggested presets to add are: Residential, Service, Unclassified, Track, Tertiary, Path, Building, Hut and Residential Area.
- The presets should now be visible in the toolbar.
- Assigning shortcut keys to the presets
- In JOSM-Preferences, open the Keyboard Shortcuts dialog. (Currently seventh icon from the top in the left column).
- Sort the Actions alphabetically, by clicking on the 'Actions' column title.
- Assign an unused key to each desired preset using the next steps. Suggested keys are: Residential=’T’, Service=‘Y’, Track=‘U’, Building='D', Hut='H', Residential Area or Tertiary='K'.
- Find the preset in the Actions list. For example, 'Toolbar: Residential' refers to the 'Residential' preset.
- Deselect both the "Use Default" and "disable" checkboxes. Set the shortcut key in the dropdown menu. Press OK. Restart JOSM when prompted.
- You should now be able to use the shortcut keys to tag objects that have been selected.
The preset file
<?xml version="1.0" encoding="UTF-8"?> <presets xmlns="http://josm.openstreetmap.de/tagging-preset-1.0" author="Chase Stephens" version="1.6_2020-09-23" shortdescription="Common Keyboard Shortcuts" description="Allows easy tagging using keyboard shortcuts for very common tags."> <item name="Motorway" type="way,closedway"> <key key="highway" value="motorway" /> </item> <item name="Primary" type="way,closedway"> <key key="highway" value="primary" /> </item> <item name="Trunk" type="way,closedway"> <key key="highway" value="trunk" /> </item> <item name="Secondary" type="way,closedway"> <key key="highway" value="secondary" /> </item> <item name="Tertiary" type="way,closedway"> <key key="highway" value="tertiary" /> </item> <item name="Residential" type="way,closedway"> <key key="highway" value="residential" /> </item> <item name="Service" type="way,closedway"> <key key="highway" value="service" /> </item> <item name="Unclassified" type="way,closedway"> <key key="highway" value="unclassified" /> </item> <item name="Track" type="way,closedway"> <key key="highway" value="track" /> </item> <item name="Path" type="way,closedway"> <key key="highway" value="path" /> </item> <item name="Building" type="closedway"> <key key="building" value="yes" /> </item> <item name="Hut" type="closedway"> <key key="building" value="hut" /> </item> <item name="Residential Area" type="closedway"> <key key="landuse" value="residential" /> </item> </presets>
Presets_CommonKeyboardShortcuts-preset.xml, Presets_CommonKeyboardShortcuts.zip