Select to view content in your preferred language

Flex Viewer Shortcut Keys

1689
9
06-13-2013 06:57 PM
ShaunWeston
Frequent Contributor
I know theres a bunch of short keys with the Flex Viewer e.g. press F goes to full extent. Just wondering where in the Flex Viewer these are set? so I could add my own ones and change existing ones.
Tags (2)
0 Kudos
9 Replies
RobertScheitlin__GISP
MVP Emeritus
Shaun,

    Those Shortcuts are built into the API and not the Viewer. But if you want to add some then you would do it in the MapManger.mxml

                    map.addEventListener(MouseEvent.MOUSE_UP, mapMouseUp);
                    map.addEventListener(MouseEvent.MOUSE_DOWN, mapMouseDown);
0 Kudos
AnthonyGiles
Honored Contributor
Robert,

Do you know if there is a list of these shortcuts anywhere?

Regards

Anthony
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Anthony,

   Some are listed on the Map Component API reference: ( but it does not seem to be a complete list )

http://resources.arcgis.com/en/help/flex-api/apiref/com/esri/ags/Map.html
0 Kudos
AnthonyGiles
Honored Contributor
Cheers Robert
0 Kudos
ShaunWeston
Frequent Contributor
Ah cheers, so its in the API.

Can we remove the event listener for the shortcut keys by going map.removeEventListener etc.?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Shaun,

   No because I believe (could be wrong though) that the API will add them back itself when some other condition is meet. I would use the keboardNavigationEnabled property

http://resources.arcgis.com/en/help/flex-api/apiref/com/esri/ags/Map.html#keyboardNavigationEnabled
0 Kudos
BjornSvensson
Esri Regular Contributor
Some are listed on the Map Component API reference: ( but it does not seem to be a complete list )
http://resources.arcgis.com/en/help/flex-api/apiref/com/esri/ags/Map.html


Which ones are you missing from the doc?  (In addition to the "f" which does a "zoomToInitialExtent()" and is already mentioned in this thread?)
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Those would be the number keys 1 thru 9 for map navigation and the directional arrows and the Home, End, Page Up, and Page Down, all for navigation.
0 Kudos
BjornSvensson
Esri Regular Contributor
Here's the draft doc for the next release:
Map navigation using keyboard:

  • Press the + key to zoom in at center of map (keyboardNavigationEnabled).

  • Press the - key to zoom out at center of map (keyboardNavigationEnabled).

  • Pan using the arrow keys (keyboardNavigationEnabled).

  • Pan using the numeric keypad: 1 or End key for panning down-left, 2 or down arrow for panning down, 3 or Page Down key for panning down-right, 4 or left arrow for panning left, 6 or right arrow for panning right, 7 or Home key for panning up-left, 8 or up arrow for panning up and 9 or Page Up key for panning up-right (keyboardNavigationEnabled).

  • Press the "f" key to zoom to initial extent (keyboardNavigationEnabled).

I think that is all the formerly undocumented keyboard shortcut keys 🙂
0 Kudos