Methods
onKeyDown
Handles a keydown event.
Argument |
Type |
Required |
Description |
interactor |
|
Yes |
the interactor |
renderer |
|
Yes |
the renderer |
key |
|
Yes |
the key |
onKeyPress
Handles a keypress event.
Argument |
Type |
Required |
Description |
interactor |
|
Yes |
the interactor |
renderer |
|
Yes |
the renderer |
key |
|
Yes |
the key |
onKeyUp
Handles a keyup event.
Argument |
Type |
Required |
Description |
interactor |
|
Yes |
the interactor |
renderer |
|
Yes |
the renderer |
key |
|
Yes |
the key |
Source
index.d.tsimport vtkRenderer from '../../../Rendering/Core/Renderer'; import vtkRenderWindowInteractor from '../../../Rendering/Core/RenderWindowInteractor';
export interface vtkCompositeKeyboardManipulator {
onKeyPress( interactor: vtkRenderWindowInteractor, renderer: vtkRenderer, key: KeyboardEvent['key'] ): void;
onKeyDown( interactor: vtkRenderWindowInteractor, renderer: vtkRenderer, key: KeyboardEvent['key'] ): void;
onKeyUp( interactor: vtkRenderWindowInteractor, renderer: vtkRenderer, key: KeyboardEvent['key'] ): void; }
export function extend(publicAPI: object, model: object): void;
export const vtkCompositeKeyboardManipulator: { extend: typeof extend; };
export default vtkCompositeKeyboardManipulator;
|
index.js
function vtkCompositeKeyboardManipulator(publicAPI, model) { model.classHierarchy.push('vtkCompositeKeyboardManipulator');
publicAPI.onKeyPress = (interactor, renderer, key) => {}; publicAPI.onKeyDown = (interactor, renderer, key) => {}; publicAPI.onKeyUp = (interactor, renderer, key) => {}; }
const DEFAULT_VALUES = {};
export function extend(publicAPI, model, initialValues = {}) { Object.assign(model, DEFAULT_VALUES, initialValues);
vtkCompositeKeyboardManipulator(publicAPI, model); }
export default { extend };
|