import React from 'react' import PropTypes from 'prop-types' import Modal from './Modal' class ShortcutsModal extends React.Component { static propTypes = { isOpen: PropTypes.bool.isRequired, onOpenToggle: PropTypes.func.isRequired, } render() { const help = [ { key: ?, text: "Shortcuts menu" }, { key: o, text: "Open modal" }, { key: e, text: "Export modal" }, { key: d, text: "Data Sources modal" }, { key: s, text: "Style Settings modal" }, { key: i, text: "Toggle inspect" }, { key: m, text: "Focus map" }, { key: !, text: "Debug modal" }, ] const mapShortcuts = [ { key: +, text: "Increase the zoom level by 1.", }, { key: <>Shift + +, text: "Increase the zoom level by 2.", }, { key: -, text: "Decrease the zoom level by 1.", }, { key: <>Shift + -, text: "Decrease the zoom level by 2.", }, { key: Up, text: "Pan up by 100 pixels.", }, { key: Down, text: "Pan down by 100 pixels.", }, { key: Left, text: "Pan left by 100 pixels.", }, { key: Right, text: "Pan right by 100 pixels.", }, { key: <>Shift + Right, text: "Increase the rotation by 15 degrees.", }, { key: <>Shift + Left, text: "Decrease the rotation by 15 degrees." }, { key: <>Shift + Up, text: "Increase the pitch by 10 degrees." }, { key: <>Shift + Down, text: "Decrease the pitch by 10 degrees." }, ] return

Press ESC to lose focus of any active elements, then press one of:

{help.map((item, idx) => { return
{item.key}
{item.text}
})}

If the Map is in focused you can use the following shortcuts

} } export default ShortcutsModal