| | 1 | == Common Keyboard Shortcuts == |
| | 2 | |
| | 3 | Adds single-key shortcuts for commonly-used tags (roads, buildings, huts, landuse). |
| | 4 | |
| | 5 | Examples of workflows after the shortcuts have been added. |
| | 6 | * Draw non-rectangular buildings, press 'q' to square the corners, press 'd' to set 'building=yes'. |
| | 7 | * Draw a closed round polygon, press 'o' to normalize the circle, press 'h' to set 'building=hut'. |
| | 8 | * Draw a road, press 't' to set 'highway=residential'. |
| | 9 | * Draw a polygon around a small settlement, press 'k' to set 'landuse=residential' |
| | 10 | |
| | 11 | === Setup === |
| | 12 | |
| | 13 | Note: All three of the following steps need to be performed for single-key shortcuts to work. |
| | 14 | |
| | 15 | A. Adding the presets to the JOSM Menu |
| | 16 | * In JOSM Preferences, open the Map Settings-Tagging Presets dialog. (Currently third icon from the top in the left column, then the third tab.) |
| | 17 | * Find 'Common Keyboard Shortcuts' in the Available Presets list on the left. Click '>' to add it to the 'Active presets' list. |
| | 18 | * Press OK, then when prompted, restart JOSM. ‘Common Keyboard Shortcuts’ should now appear under ‘Presets’. |
| | 19 | |
| | 20 | B. Adding the presets to the JOSM Toolbar |
| | 21 | * In JOSM-Preferences, open the Toolbar-Preferences dialog. (Currently fifth icon from the top in the left column). |
| | 22 | * In the Available pane, open the Presets folder, select a preset, and click the ‘<‘ button to add it to the toolbar. Presets to add are: Residential, Service, Unclassified, Track, Tertiary, Building, Hut and Residential Area. |
| | 23 | * The presets should now be visible in the toolbar. |
| | 24 | |
| | 25 | C. Assigning shortcut keys to the presets |
| | 26 | * In JOSM-Preferences, open the Keyboard Shortcuts dialog. (Currently seventh icon from the top in the left column). |
| | 27 | * Sort the Actions alphabetically, by clicking on the 'Actions' column title. |
| | 28 | * 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'. |
| | 29 | * Find the preset in the Actions list. For example, 'Toolbar: Residential' refers to the 'Residential' preset. |
| | 30 | * Deselect both the "Use Default" and "disable" checkboxes. Set the shortcut key in the dropdown menu. Press OK. Restart JOSM when prompted. |
| | 31 | * You should now be able to use the shortcut keys to tag objects that have been selected. |
| | 32 | |
| | 33 | === The preset file === |
| | 34 | |
| | 35 | {{{ |
| | 36 | #!preset |
| | 37 | <?xml version="1.0" encoding="UTF-8"?> |
| | 38 | <presets xmlns="http://josm.openstreetmap.de/tagging-preset-1.0" |
| | 39 | author="Chase Stephens" |
| | 40 | version="1.[[revision]]_[[date]]" |
| | 41 | shortdescription="Common Keyboard Shortcuts" |
| | 42 | description="Allows easy tagging using keyboard shortcuts for very common tags."> |
| | 43 | <item name="Residential" type="way,closedway"> |
| | 44 | <key key="highway" value="residential" /> |
| | 45 | </item> |
| | 46 | <item name="Service" type="way,closedway"> |
| | 47 | <key key="highway" value="service" /> |
| | 48 | </item> |
| | 49 | <item name="Unclassified" type="way,closedway"> |
| | 50 | <key key="highway" value="unclassified" /> |
| | 51 | </item> |
| | 52 | <item name="Track" type="way,closedway"> |
| | 53 | <key key="highway" value="track" /> |
| | 54 | </item> |
| | 55 | <item name="Tertiary" type="way,closedway"> |
| | 56 | <key key="highway" value="tertiary" /> |
| | 57 | </item> |
| | 58 | <item name="Building" type="closedway"> |
| | 59 | <key key="building" value="yes" /> |
| | 60 | </item> |
| | 61 | <item name="Hut" type="closedway"> |
| | 62 | <key key="building" value="hut" /> |
| | 63 | </item> |
| | 64 | <item name="Residential Area" type="closedway"> |
| | 65 | <key key="landuse" value="residential" /> |
| | 66 | </item> |
| | 67 | </presets> |
| | 68 | }}} |