MCPcopy Create free account
hub / github.com/MankaiHuang/screen-visualization / keydown

Function keydown

public/iframe/lib/js/TrackballControls.js:449–473  ·  view source on GitHub ↗
( event )

Source from the content-addressed store, hash-verified

447 }
448
449 function keydown( event ) {
450
451 if ( scope.enabled === false ) return;
452
453 window.removeEventListener( 'keydown', keydown );
454
455 if ( _keyState !== STATE.NONE ) {
456
457 return;
458
459 } else if ( event.keyCode === scope.keys[ STATE.ROTATE ] && ! scope.noRotate ) {
460
461 _keyState = STATE.ROTATE;
462
463 } else if ( event.keyCode === scope.keys[ STATE.ZOOM ] && ! scope.noZoom ) {
464
465 _keyState = STATE.ZOOM;
466
467 } else if ( event.keyCode === scope.keys[ STATE.PAN ] && ! scope.noPan ) {
468
469 _keyState = STATE.PAN;
470
471 }
472
473 }
474
475 function keyup() {
476

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected