clipboardEvents.d.ts 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /**
  2. * Gather the list of clipboard event types as constants.
  3. */
  4. export declare class ClipboardEventTypes {
  5. /**
  6. * The clipboard event is fired when a copy command is active (pressed).
  7. */
  8. static readonly COPY = 1;
  9. /**
  10. * The clipboard event is fired when a cut command is active (pressed).
  11. */
  12. static readonly CUT = 2;
  13. /**
  14. * The clipboard event is fired when a paste command is active (pressed).
  15. */
  16. static readonly PASTE = 3;
  17. }
  18. /**
  19. * This class is used to store clipboard related info for the onClipboardObservable event.
  20. */
  21. export declare class ClipboardInfo {
  22. /**
  23. * Defines the type of event (BABYLON.ClipboardEventTypes)
  24. */
  25. type: number;
  26. /**
  27. * Defines the related dom event
  28. */
  29. event: ClipboardEvent;
  30. /**
  31. *Creates an instance of ClipboardInfo.
  32. * @param type Defines the type of event (BABYLON.ClipboardEventTypes)
  33. * @param event Defines the related dom event
  34. */
  35. constructor(
  36. /**
  37. * Defines the type of event (BABYLON.ClipboardEventTypes)
  38. */
  39. type: number,
  40. /**
  41. * Defines the related dom event
  42. */
  43. event: ClipboardEvent);
  44. /**
  45. * Get the clipboard event's type from the keycode.
  46. * @param keyCode Defines the keyCode for the current keyboard event.
  47. * @returns {number}
  48. */
  49. static GetTypeFromCharacter(keyCode: number): number;
  50. }