This commit is contained in:
Jamie Wong
2018-10-29 09:56:06 -07:00
parent 9961ed8295
commit 23d4042e04
3 changed files with 17 additions and 1 deletions
+5
View File
@@ -660,6 +660,11 @@ export class FlamechartPanZoomView extends Component<FlamechartPanZoomViewProps,
if (ev.ctrlKey || ev.shiftKey || ev.metaKey) return
// NOTE: We intentionally use ev.code rather than ev.key for
// WASD in order to have the keys retain the same layout even
// if the keyboard layout is not QWERTY.
//
// See: https://github.com/jlfwong/speedscope/pull/184
if (ev.key === '0') {
this.zoom(new Vec2(width / 2, height / 2), 1e9)
} else if (ev.key === 'ArrowRight' || ev.code === 'KeyD') {