create-gojs-kit
Version:
A CLI for downloading GoJS samples, extensions, and docs
304 lines • 57.2 kB
HTML
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><link rel="stylesheet" href="../../assets/css/style.css"/><link rel="preconnect" href="https://rsms.me/"/><link rel="stylesheet" href="https://rsms.me/inter/inter.css"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>InputEvent | GoJS API</title><meta name="description" content="Documentation for GoJS API"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><link rel="stylesheet" href="../assets/custom.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script type="text/javascript">// formerly in api.js
var hash = null;
function changeHash() {
var panels = document.getElementsByClassName("tsd-panel");
for (let i = 0; i < panels.length; i++) {
var p = panels[i];
p.classList.remove("targeted");
}
hash = window.location.hash.slice(1);
if (hash) {
var elt = document.getElementById(hash);
if (elt) elt.parentNode.classList.add("targeted");
}
}
document.addEventListener("DOMContentLoaded", changeHash);
window.addEventListener("hashchange", changeHash);</script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header><nav id="navTop" class="w-full h-[var(--topnav-h)] z-30 bg-[var(--color-background-secondary)] border-b border-b-[var(--color-accent)]"><div class="max-w-screen-xl mx-auto flex flex-wrap items-start justify-between px-4"><a class="!text-white bg-nwoods-primary font-bold !leading-[calc(var(--topnav-h)_-_1px)] my-0 px-2 text-4xl lg:text-5xl logo" href="../../index.html">GoJS</a><div class="relative"><button id="topnavButton" class="h-[calc(var(--topnav-h)_-_1px)] px-2 m-0 text-[var(--color-text)] bg-inherit shadow-none md:hidden hover:!bg-inherit hover:!text-nwoods-accent hover:!shadow-none" aria-label="Navigation"><svg class="h-7 w-7 block" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path d="M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5" stroke-linecap="round" stroke-linejoin="round"></path></svg></button><div id="topnavList" class="hidden md:block"><div class="absolute right-0 z-30 flex flex-col items-end rounded border border-[var(--color-accent)] p-4 pl-12 shadow bg-[var(--color-background-secondary)] text-[var(--color-text)] font-semibold
md:flex-row md:space-x-4 md:items-start md:border-0 md:p-0 md:shadow-none md:!bg-inherit"><a href="../../learn/index.html">Learn</a><a href="../../samples/index.html">Samples</a><a href="../../intro/index.html">Intro</a><a class="active" href="../../api/index.html">API</a><a href="../../download.html">Download</a><a href="https://forum.nwoods.com/c/gojs/11" target="_blank" rel="noopener">Forum</a><a href="https://nwoods.com/contact.html" target="_blank" rel="noopener" id="contactBtn">Contact</a><a href="https://nwoods.com/sales/index.html" target="_blank" rel="noopener" id="buyBtn">Buy</a></div></div></div></div></nav><script>window.addEventListener("DOMContentLoaded", function () {
// topnav
var topButton = document.getElementById("topnavButton");
var topnavList = document.getElementById("topnavList");
if (topButton && topnavList) {
topButton.addEventListener("click", function (e) {
topnavList
.classList
.toggle("hidden");
e.stopPropagation();
});
document.addEventListener("click", function (e) {
// if the clicked element isn't the list, close the list
if (!topnavList.classList.contains("hidden") && !e.target.closest("#topnavList")) {
topButton.click();
}
});
// set active <a> element
// done via active tag below, always API
}
});</script><div class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><div id="tsd-search-help"><code class="!text-lg">/</code> to search</div><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">GoJS API</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><div class="flex w-full max-w-screen-xl mx-auto px-2 items-center justify-between"><div><ul class="tsd-breadcrumb"><li><a href="../index.html">GoJS API</a></li><li><a href="InputEvent.html">InputEvent</a></li></ul><h1 class="flex items-center">Class InputEvent</h1></div><div class="text-xs"><b>GoJS</b>® Diagramming Components<br/>version 3.1.0<br/>by <a href="https://nwoods.com/">Northwoods Software®</a></div></div></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>An InputEvent represents a mouse or keyboard or touch event.
The principal properties hold information about a particular input event.
These properties include the <a href="InputEvent.html#documentPoint" class="tsd-kind-accessor">documentPoint</a> at which a mouse event
occurred in document coordinates,
the corresponding point in view/element coordinates, <a href="InputEvent.html#viewPoint" class="tsd-kind-accessor">viewPoint</a>,
the <a href="InputEvent.html#key" class="tsd-kind-accessor">key</a> and <a href="InputEvent.html#code" class="tsd-kind-accessor">code</a> for keyboard events,
and the <a href="InputEvent.html#modifiers" class="tsd-kind-accessor">modifiers</a> and <a href="InputEvent.html#button" class="tsd-kind-accessor">button</a> at the time.
Additional descriptive properties include <a href="InputEvent.html#clickCount" class="tsd-kind-accessor">clickCount</a>, <a href="InputEvent.html#delta" class="tsd-kind-accessor">delta</a>,
<a href="InputEvent.html#timestamp" class="tsd-kind-accessor">timestamp</a>, and the source event <a href="InputEvent.html#event" class="tsd-kind-accessor">event</a> (if available).</p>
<p>Many of its properties are provided for convenient access to the state of the input event,
such as asking whether the <a href="InputEvent.html#control" class="tsd-kind-accessor">control</a> key was held down at the time,
or the <a href="InputEvent.html#targetObject" class="tsd-kind-accessor">targetObject</a> (a <a href="GraphObject.html" class="tsd-kind-class">GraphObject</a>) that the mouse was over.
KeyboardEvent keys across languages are normalized for use in Tools and Commands via <a href="InputEvent.html#commandKey" class="tsd-kind-accessor">commandKey</a>.</p>
<p>When real events fire on the Diagram, InputEvents are created automatically set update the value of <a href="Diagram.html#lastInput" class="tsd-kind-accessor">Diagram.lastInput</a>.
These events set the value of <a href="InputEvent.html#event" class="tsd-kind-accessor">event</a> with the backing browser-defined Event,
which may be a MouseEvent, KeyboardEvent, PointerEvent, and so on.</p>
<p>InputEvents backed by MouseEvents set both <a href="InputEvent.html#button" class="tsd-kind-accessor">button</a>, the button that caused the action,
and <a href="InputEvent.html#buttons" class="tsd-kind-accessor">buttons</a>, the set of buttons currently pressed after the action has happened.
By default a user-created InputEvent sets <a href="InputEvent.html#button" class="tsd-kind-accessor">button</a> and <a href="InputEvent.html#buttons" class="tsd-kind-accessor">buttons</a> as if the event was a left-click.</p>
<p>You can create InputEvents and set the value of <a href="Diagram.html#lastInput" class="tsd-kind-accessor">Diagram.lastInput</a> in order to simulate user actions in tools.
This can be useful for testing. See the <a href="../../extensions/Robot.html">Robot extension sample</a> for
an example of creating InputEvents to simulate user input.</p>
</div></section><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="true" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="InputEvent.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
</div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Accessors</h3><div class="tsd-index-list"><a href="InputEvent.html#alt" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>alt</span></a>
<a href="InputEvent.html#bubbles" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>bubbles</span></a>
<a href="InputEvent.html#button" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>button</span></a>
<a href="InputEvent.html#buttons" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>buttons</span></a>
<a href="InputEvent.html#clickCount" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>click<wbr/>Count</span></a>
<a href="InputEvent.html#code" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>code</span></a>
<a href="InputEvent.html#commandKey" class="tsd-index-link"><svg class="readonly tsd-subicon" viewBox="0 0 28 28"><g id="subicon-R,#FF4D4D"><rect fill="var(--color-icon-background)" width="28" height="28" rx="14"></rect><path transform="translate(2, 2)" fill="none" stroke-width="1.5" stroke="var(--color-text)" d="M16.5 10.5V6.75a4.5 4.5 0 1 0-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 0 0 2.25-2.25v-6.75a2.25 2.25 0 0 0-2.25-2.25H6.75a2.25 2.25 0 0 0-2.25 2.25v6.75a2.25 2.25 0 0 0 2.25 2.25Z" stroke-linecap="round" stroke-linejoin="round"></path></g></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>command<wbr/>Key</span></a>
<a href="InputEvent.html#control" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>control</span></a>
<a href="InputEvent.html#delta" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>delta</span></a>
<a href="InputEvent.html#diagram" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>diagram</span></a>
<a href="InputEvent.html#documentPoint" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>document<wbr/>Point</span></a>
<a href="InputEvent.html#down" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>down</span></a>
<a href="InputEvent.html#event" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>event</span></a>
<a href="InputEvent.html#handled" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>handled</span></a>
<a href="InputEvent.html#isMultiTouch" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>is<wbr/>Multi<wbr/>Touch</span></a>
<a href="InputEvent.html#isTouchEvent" class="tsd-index-link"><svg class="readonly tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-R,#FF4D4D"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>is<wbr/>Touch<wbr/>Event</span></a>
<a href="InputEvent.html#key" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>key</span></a>
<a href="InputEvent.html#left" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>left</span></a>
<a href="InputEvent.html#meta" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>meta</span></a>
<a href="InputEvent.html#middle" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>middle</span></a>
<a href="InputEvent.html#modifiers" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>modifiers</span></a>
<a href="InputEvent.html#right" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>right</span></a>
<a href="InputEvent.html#shift" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>shift</span></a>
<a href="InputEvent.html#targetDiagram" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>target<wbr/>Diagram</span></a>
<a href="InputEvent.html#targetObject" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>target<wbr/>Object</span></a>
<a href="InputEvent.html#timestamp" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>timestamp</span></a>
<a href="InputEvent.html#up" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>up</span></a>
<a href="InputEvent.html#viewPoint" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>view<wbr/>Point</span></a>
</div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="InputEvent.html#copy" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>copy</span></a>
</div></section></div></details></section></section><section class="tsd-panel-group tsd-member-group"><h2>Constructors</h2><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="constructor.new_InputEvent" class="tsd-anchor"></a><span class="tsd-kind-constructor-signature">new <wbr/>Input<wbr/>Event</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="InputEvent.html" class="tsd-signature-type tsd-kind-class">InputEvent</a><a href="#constructor.new_InputEvent" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>The InputEvent class constructor produces an empty InputEvent.
It is uncommon to need to call this constructor -- normally only when trying to simulate input events.
But if you do, you must first set <a href="InputEvent.html#diagram" class="tsd-kind-accessor">diagram</a> to the Diagram before any other use.</p>
</div><h4 class="tsd-returns-title">Returns <a href="InputEvent.html" class="tsd-signature-type tsd-kind-class">InputEvent</a></h4></li></ul></section></section><section class="tsd-panel-group tsd-member-group"><h2>Accessors</h2><section class="tsd-panel tsd-member"><a id="alt" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>alt</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></div><a href="#alt" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets whether the alt key is being held down.
This is true if the key was pressed at the time of the event.</p>
</div><div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">see</code><ul>
<li><a href="InputEvent.html#modifiers" class="tsd-kind-accessor">modifiers</a></li>
<li><a href="InputEvent.html#control" class="tsd-kind-accessor">control</a></li>
<li><a href="InputEvent.html#shift" class="tsd-kind-accessor">shift</a></li>
<li><a href="InputEvent.html#meta" class="tsd-kind-accessor">meta</a></li>
</ul>
</div></div></li></ul></section><section class="tsd-panel tsd-member"><a id="bubbles" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>bubbles</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></div><a href="#bubbles" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets whether the underlying <a href="InputEvent.html#event" class="tsd-kind-accessor">event</a> is prevented from bubbling up
the hierarchy of HTML elements outside of the Diagram and whether any default action is canceled.
Setting this is uncommon, but may be needed in some <a href="CommandHandler.html" class="tsd-kind-class">CommandHandler</a> overrides in order to
pass along events, such as keystrokes, to parent elements of the Diagram.</p>
<p>Some event handlers may set this to true if the event should continue beyond the diagram's DIV
and result in any default behaviors by the user-agent.
The default value is false.</p>
</div><div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">since</code><p>2.2</p>
</div><div class="flex items-center"><code class="tsd-tag">see</code><p><a href="InputEvent.html#handled" class="tsd-kind-accessor">handled</a></p>
</div></div></li></ul></section><section class="tsd-panel tsd-member"><a id="button" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>button</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></div><a href="#button" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets the numerical value representing the mouse button that caused this event.</p>
<p>Only one mouse button can cause an event at a time,
but the set of all buttons currently pressed is kept in <a href="InputEvent.html#buttons" class="tsd-kind-accessor">buttons</a>.</p>
<p>This property describes nothing during a <code>mousemove</code> event,
since no button press causes the event. Instead, use the convenience properties
<a href="InputEvent.html#left" class="tsd-kind-accessor">left</a>, <a href="InputEvent.html#middle" class="tsd-kind-accessor">middle</a>, or <a href="InputEvent.html#right" class="tsd-kind-accessor">right</a>, or use the value
of <a href="InputEvent.html#buttons" class="tsd-kind-accessor">buttons</a> to determine which mouse buttons are
held during <code>mousemove</code> events.</p>
<p>Common values for this property:</p>
<ul>
<li>0: left mouse button</li>
<li>1: middle mouse button</li>
<li>2: right mouse button</li>
</ul>
<p>Other values are possible if the mouse has additional buttons.</p>
<p>If there is no associated <a href="InputEvent.html#event" class="tsd-kind-accessor">event</a>, setting this also
sets the <a href="InputEvent.html#buttons" class="tsd-kind-accessor">buttons</a> flags to only this button.</p>
<p>This property is valid if this is a mouse event.</p>
</div><div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">see</code><ul>
<li><a href="InputEvent.html#buttons" class="tsd-kind-accessor">buttons</a></li>
<li><a href="InputEvent.html#left" class="tsd-kind-accessor">left</a></li>
<li><a href="InputEvent.html#middle" class="tsd-kind-accessor">middle</a></li>
<li><a href="InputEvent.html#right" class="tsd-kind-accessor">right</a></li>
</ul>
</div></div></li></ul></section><section class="tsd-panel tsd-member"><a id="buttons" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>buttons</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></div><a href="#buttons" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets the set of buttons that are currently being held down.
If this is a <code>mouseup</code> event, this set of buttons does not include
the button that was just released, which will be the value of <a href="InputEvent.html#button" class="tsd-kind-accessor">button</a>.</p>
<p>Common values for this property:</p>
<ul>
<li>0: not holding down any button</li>
<li>1: left mouse button</li>
<li>2: right mouse button</li>
<li>3: both left and right mouse buttons</li>
<li>4: middle mouse button</li>
<li>5: middle and left mouse buttons</li>
<li>6: middle and right mouse buttons</li>
<li>7: all three common mouse buttons</li>
</ul>
<p>Other values are possible if the mouse has additional buttons.</p>
<p>This property is valid if this is a mouse event.</p>
</div><div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">see</code><ul>
<li><a href="InputEvent.html#button" class="tsd-kind-accessor">button</a></li>
<li><a href="InputEvent.html#left" class="tsd-kind-accessor">left</a></li>
<li><a href="InputEvent.html#middle" class="tsd-kind-accessor">middle</a></li>
<li><a href="InputEvent.html#right" class="tsd-kind-accessor">right</a></li>
</ul>
</div></div></li></ul></section><section class="tsd-panel tsd-member"><a id="clickCount" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>click<wbr/>Count</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></div><a href="#clickCount" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets whether this event represents a click or a double-click.
It is zero if not a click; one if a single-click; two if a double-click.
This property is valid if this is a mouse event.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="code" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>code</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></div><a href="#code" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets the code pressed or released as this event.
This property is valid if this is a keyboard event.
This corresponds to a <code>KeyboardEvent.code</code></p>
</div><div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">see</code><p><a href="InputEvent.html#commandKey" class="tsd-kind-accessor">commandKey</a></p>
</div><div class="flex items-center"><code class="tsd-tag">since</code><p>3.0</p>
</div></div></li></ul></section><section class="tsd-panel tsd-member"><a id="commandKey" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadOnly">Readonly</code><span>command<wbr/>Key</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></div><a href="#commandKey" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Given this InputEvent's <a href="InputEvent.html#key" class="tsd-kind-accessor">key</a> and <a href="InputEvent.html#code" class="tsd-kind-accessor">code</a>, this gets the lowercase key,
or else the code string, relevant for built-in Commands.
This is intended to normalize values across keyboard layouts in different languages.</p>
<p>This will return one of the lowercase letters used by the <a href="CommandHandler.html" class="tsd-kind-class">CommandHandler</a>: <code>'c', 'x', 'v', 'y', 'z', 'a', 'g'</code>,
or else a <code>KeyboardEvent.code</code> string for a key such as <code>'Delete', 'Insert', 'Backspace', 'ArrowDown'</code>, etc.</p>
</div><div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">since</code><p>3.0</p>
</div></div></li></ul></section><section class="tsd-panel tsd-member"><a id="control" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>control</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></div><a href="#control" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets whether the control key is being held down.
This is true if the key was pressed at the time of the event.</p>
</div><div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">see</code><ul>
<li><a href="InputEvent.html#modifiers" class="tsd-kind-accessor">modifiers</a></li>
<li><a href="InputEvent.html#shift" class="tsd-kind-accessor">shift</a></li>
<li><a href="InputEvent.html#alt" class="tsd-kind-accessor">alt</a></li>
<li><a href="InputEvent.html#meta" class="tsd-kind-accessor">meta</a></li>
</ul>
</div></div></li></ul></section><section class="tsd-panel tsd-member"><a id="delta" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>delta</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></div><a href="#delta" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets the amount of change associated with a mouse-wheel rotation.
It is an abstract number, either positive or negative.
This property is valid if this is a mouse-wheel event.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="diagram" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>diagram</span><div class="membertype"><span class="tsd-signature-symbol">: </span><a href="Diagram.html" class="tsd-signature-type tsd-kind-class">Diagram</a></div><a href="#diagram" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets the source diagram associated with the event.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="documentPoint" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>document<wbr/>Point</span><div class="membertype"><span class="tsd-signature-symbol">: </span><a href="Point.html" class="tsd-signature-type tsd-kind-class">Point</a></div><a href="#documentPoint" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets the point at which this input event occurred, in document coordinates.
The Point is in document coordinates, the same as the <a href="GraphObject.html#position" class="tsd-kind-accessor">GraphObject.position</a>
for <a href="Part.html" class="tsd-kind-class">Part</a>s in the diagram.
This should be valid for mouse events.
For keyboard events, this is the last available mouse point.</p>
</div><div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">see</code><ul>
<li><a href="InputEvent.html#viewPoint" class="tsd-kind-accessor">viewPoint</a></li>
<li><a href="Diagram.html#transformViewToDoc" class="tsd-kind-method">Diagram.transformViewToDoc</a></li>
<li><a href="Diagram.html#transformDocToView" class="tsd-kind-method">Diagram.transformDocToView</a></li>
</ul>
</div></div></li></ul></section><section class="tsd-panel tsd-member"><a id="down" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>down</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></div><a href="#down" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets whether the InputEvent represents a mouse-down or a key-down event.
The default value is false.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="event" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>event</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Event</span></div><a href="#event" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets the platform's user-agent-supplied event for this event.
It may be null if no underlying event exists.</p>
</div><div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">see</code><p><a href="InputEvent.html#timestamp" class="tsd-kind-accessor">timestamp</a></p>
</div></div></li></ul></section><section class="tsd-panel tsd-member"><a id="handled" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>handled</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></div><a href="#handled" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets whether an InputEvent that applies to a <a href="GraphObject.html" class="tsd-kind-class">GraphObject</a> and bubbles
up the chain of containing <a href="Panel.html" class="tsd-kind-class">Panel</a>s is stopped from continuing up the chain.</p>
<p>Some event handlers may set this to true to avoid getting any behavior from the containing Panels.
The default value is false.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="isMultiTouch" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>is<wbr/>Multi<wbr/>Touch</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></div><a href="#isMultiTouch" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>This property is true when the InputEvent is caused by a touch event that registered more than one touch.</p>
</div><div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">see</code><p><a href="InputEvent.html#isTouchEvent" class="tsd-kind-accessor">isTouchEvent</a></p>
</div></div></li></ul></section><section class="tsd-panel tsd-member"><a id="isTouchEvent" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadOnly">Readonly</code><span>is<wbr/>Touch<wbr/>Event</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></div><a href="#isTouchEvent" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>This read-only property is true when the InputEvent is caused by a touch event.</p>
</div><div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">see</code><p><a href="InputEvent.html#isMultiTouch" class="tsd-kind-accessor">isMultiTouch</a></p>
</div></div></li></ul></section><section class="tsd-panel tsd-member"><a id="key" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>key</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></div><a href="#key" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets the key pressed or released as this event.
This property is valid if this is a keyboard event.
This corresponds to a <code>KeyboardEvent.key</code></p>
</div><div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">see</code><p><a href="InputEvent.html#commandKey" class="tsd-kind-accessor">commandKey</a></p>
</div></div></li></ul></section><section class="tsd-panel tsd-member"><a id="left" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>left</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></div><a href="#left" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets whether the logical left mouse button is being held down.
This is true if the button was pressed at the time of the event.</p>
<p>If this InputEvent has a <a href="InputEvent.html#event" class="tsd-kind-accessor">event</a> of type <code>MouseEvent</code> with <code>e.type</code> of "mouseup" or "mousedown",
this property uses the value of <a href="InputEvent.html#button" class="tsd-kind-accessor">button</a>. Otherwise, it uses the value of <a href="InputEvent.html#buttons" class="tsd-kind-accessor">buttons</a>.</p>
<p>When setting, this sets the value of <a href="InputEvent.html#buttons" class="tsd-kind-accessor">buttons</a>.
Because a button must be pressed on an InputEvent, setting this to false does not modify the value
of <a href="InputEvent.html#button" class="tsd-kind-accessor">button</a>, but setting it to true does set <a href="InputEvent.html#button" class="tsd-kind-accessor">button</a>.</p>
</div><div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">see</code><ul>
<li><a href="InputEvent.html#button" class="tsd-kind-accessor">button</a></li>
<li><a href="InputEvent.html#middle" class="tsd-kind-accessor">middle</a></li>
<li><a href="InputEvent.html#right" class="tsd-kind-accessor">right</a></li>
</ul>
</div></div></li></ul></section><section class="tsd-panel tsd-member"><a id="meta" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>meta</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></div><a href="#meta" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets whether the meta key is being held down.
This is true if the key was pressed at the time of the event.</p>
</div><div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">see</code><ul>
<li><a href="InputEvent.html#modifiers" class="tsd-kind-accessor">modifiers</a></li>
<li><a href="InputEvent.html#control" class="tsd-kind-accessor">control</a></li>
<li><a href="InputEvent.html#shift" class="tsd-kind-accessor">shift</a></li>
<li><a href="InputEvent.html#alt" class="tsd-kind-accessor">alt</a></li>
</ul>
</div></div></li></ul></section><section class="tsd-panel tsd-member"><a id="middle" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>middle</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></div><a href="#middle" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets whether the logical middle mouse button is being held down.
This is true if the button was pressed at the time of the event.</p>
<p>If this InputEvent has a <a href="InputEvent.html#event" class="tsd-kind-accessor">event</a> of type <code>MouseEvent</code> with <code>e.type</code> of "mouseup" or "mousedown",
this property uses the value of <a href="InputEvent.html#button" class="tsd-kind-accessor">button</a>. Otherwise, it uses the value of <a href="InputEvent.html#buttons" class="tsd-kind-accessor">buttons</a>.</p>
<p>When setting, this sets the value of <a href="InputEvent.html#buttons" class="tsd-kind-accessor">buttons</a>.
Because a button must be pressed on an InputEvent, setting this to false does not modify the value
of <a href="InputEvent.html#button" class="tsd-kind-accessor">button</a>, but setting it to true does set <a href="InputEvent.html#button" class="tsd-kind-accessor">button</a>.</p>
</div><div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">see</code><ul>
<li><a href="InputEvent.html#button" class="tsd-kind-accessor">button</a></li>
<li><a href="InputEvent.html#left" class="tsd-kind-accessor">left</a></li>
<li><a href="InputEvent.html#right" class="tsd-kind-accessor">right</a></li>
</ul>
</div></div></li></ul></section><section class="tsd-panel tsd-member"><a id="modifiers" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>modifiers</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></div><a href="#modifiers" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets the modifier keys that were used with the mouse or keyboard event.
The number will be a combination of flags representing Control, Shift, Alt or Meta.</p>
</div><div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">see</code><ul>
<li><a href="InputEvent.html#control" class="tsd-kind-accessor">control</a></li>
<li><a href="InputEvent.html#shift" class="tsd-kind-accessor">shift</a></li>
<li><a href="InputEvent.html#alt" class="tsd-kind-accessor">alt</a></li>
<li><a href="InputEvent.html#meta" class="tsd-kind-accessor">meta</a></li>
</ul>
</div></div></li></ul></section><section class="tsd-panel tsd-member"><a id="right" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>right</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></div><a href="#right" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets whether the logical right mouse button is being held down.
This is true if the button was pressed at the time of the event.</p>
<p>If this InputEvent has a <a href="InputEvent.html#event" class="tsd-kind-accessor">event</a> of type <code>MouseEvent</code> with <code>e.type</code> of "mouseup" or "mousedown",
this property uses the value of <a href="InputEvent.html#button" class="tsd-kind-accessor">button</a>. Otherwise, it uses the value of <a href="InputEvent.html#buttons" class="tsd-kind-accessor">buttons</a>.</p>
<p>When setting, this sets the value of <a href="InputEvent.html#buttons" class="tsd-kind-accessor">buttons</a>.
Because a button must be pressed on an InputEvent, setting this to false does not modify the value
of <a href="InputEvent.html#button" class="tsd-kind-accessor">button</a>, but setting it to true does set <a href="InputEvent.html#button" class="tsd-kind-accessor">button</a>.</p>
</div><div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">see</code><ul>
<li><a href="InputEvent.html#button" class="tsd-kind-accessor">button</a></li>
<li><a href="InputEvent.html#left" class="tsd-kind-accessor">left</a></li>
<li><a href="InputEvent.html#middle" class="tsd-kind-accessor">middle</a></li>
</ul>
</div></div></li></ul></section><section class="tsd-panel tsd-member"><a id="shift" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>shift</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></div><a href="#shift" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets whether the shift key is being held down.
This is true if the key was pressed at the time of the event.</p>
</div><div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">see</code><ul>
<li><a href="InputEvent.html#modifiers" class="tsd-kind-accessor">modifiers</a></li>
<li><a href="InputEvent.html#control" class="tsd-kind-accessor">control</a></li>
<li><a href="InputEvent.html#alt" class="tsd-kind-accessor">alt</a></li>
<li><a href="InputEvent.html#meta" class="tsd-kind-accessor">meta</a></li>
</ul>
</div></div></li></ul></section><section class="tsd-panel tsd-member"><a id="targetDiagram" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>target<wbr/>Diagram</span><div class="membertype"><span class="tsd-signature-symbol">: </span><a href="Diagram.html" class="tsd-signature-type tsd-kind-class">Diagram</a></div><a href="#targetDiagram" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets the diagram associated with the canvas that the event is currently targeting.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="targetObject" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>target<wbr/>Object</span><div class="membertype"><span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type tsd-kind-class">GraphObject</a></div><a href="#targetObject" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets the <a href="GraphObject.html" class="tsd-kind-class">GraphObject</a> that is at the current mouse point, if any.</p>
<p>For those events that are bubbled up the chain of parent <a href="Panel.html" class="tsd-kind-class">Panel</a>s,
this property provides access to the original <a href="GraphObject.html" class="tsd-kind-class">GraphObject</a> where the input event occurred.</p>
</div><div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">see</code><p><a href="InputEvent.html#handled" class="tsd-kind-accessor">handled</a></p>
</div></div></li></ul></section><section class="tsd-panel tsd-member"><a id="timestamp" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>timestamp</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></div><a href="#timestamp" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets the time at which the event occurred, in milliseconds.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="up" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>up</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></div><a href="#up" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets whether the InputEvent represents a mouse-up or a key-up event.
The default value is false.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="viewPoint" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>view<wbr/>Point</span><div class="membertype"><span class="tsd-signature-symbol">: </span><a href="Point.html" class="tsd-signature-type tsd-kind-class">Point</a></div><a href="#viewPoint" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets the point at which this input event occurred.
The Point is in view coordinates within the viewport, not in document coordinates.
This should be valid for mouse events.
For keyboard events, this is the last available mouse point.</p>
</div><div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">see</code><ul>
<li><a href="InputEvent.html#documentPoint" class="tsd-kind-accessor">documentPoint</a></li>
<li><a href="Diagram.html#transformViewToDoc" class="tsd-kind-method">Diagram.transformViewToDoc</a></li>
<li><a href="Diagram.html#transformDocToView" class="tsd-kind-method">Diagram.transformDocToView</a></li>
</ul>
</div></div></li></ul></section></section><section class="tsd-panel-group tsd-member-group"><h2>Methods</h2><section class="tsd-panel tsd-member"><a id="copy" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagVirtual">Virtual</code><span>copy</span><a href="#copy" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="copy.copy-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">copy</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="InputEvent.html" class="tsd-signature-type tsd-kind-class">InputEvent</a><a href="#copy.copy-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Make a copy of this InputEvent.</p>
</div><h4 class="tsd-returns-title">Returns <a href="InputEvent.html" class="tsd-signature-type tsd-kind-class">InputEvent</a></h4></li></ul></section></section></div><div class="col-sidebar"><div class="page-menu"><details open class="tsd-index-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><ul><li><a href="#constructor"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></li><li><a href="#alt"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>alt</span></a></li><li><a href="#bubbles"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>bubbles</span></a></li><li><a href="#button"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>button</span></a></li><li><a href="#buttons"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>buttons</span></a></li><li><a href="#clickCount"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>click<wbr/>Count</span></a></li><li><a href="#code"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>code</span></a></li><li><a href="#commandKey"><svg class="readonly tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-R,#FF4D4D"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>command<wbr/>Key</span></a></li><li><a href="#control"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>control</span></a></li><li><a href="#delta"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>delta</span></a></li><li><a href="#diagram"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>diagram</span></a></li><li><a href="#documentPoint"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>document<wbr/>Point</span></a></li><li><a href="#down"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>down</span></a></li><li><a href="#event"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>event</span></a></li><li><a href="#handled"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>handled</span></a></li><li><a href="#isMultiTouch"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>is<wbr/>Multi<wbr/>Touch</span></a></li><li><a href="#isTouchEvent"><svg class="readonly tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-R,#FF4D4D"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>is<wbr/>Touch<wbr/>Event</span></a></li><li><a href="#key"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>key</span></a></li><li><a href="#left"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>left</span></a></li><li><a href="#meta"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>meta</span></a></li><li><a href="#middle"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>middle</span></a></li><li><a href="#modifiers"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>modifiers</span></a></li><li><a href="#right"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>right</span></a></li><li><a href="#shift"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>shift</span></a></li><li><a href="#targetDiagram"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>target<wbr/>Diagram</span></a></li><li><a href="#targetObject"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>target<wbr/>Object</span></a></li><li><a href="#timestamp"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>timestamp</span></a></li><li><a href="#up"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>up</span></a></li><li><a href="#viewPoint"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>view<wbr/>Point</span></a></li><li><a href="#copy"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>copy</span></a></li></ul></div></details><div class="tsd-navigation settings"><div class="tsd-theme-toggle"><h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">System</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>GoJS API</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><div class="tsd w-full max-w-screen-xl mx-auto px-2"><div class="bottom-copyright">Copyright © 1998-2025 by Northwoods Software Corporation.</div></div><div class="overlay"></div><script async src="https://www.googletagmanager.com/gtag/js?id=G-S5QK8VSK84"></script><script>window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-S5QK8VSK84');
var getOutboundLink = function(url, label) {
gtag('event', 'click', {
'event_category': 'outbound',
'event_label': label,
'transport_type': 'beacon'
});
}
document.getElementById("contactBtn").addEventListener("click", function() {
getOutboundLink('https://nwoods.com/contact.html', 'contact');
});
document.getElementById("buyBtn").addEventListener("click", function() {
getOutboundLink('https://nwoods.com/sales/index.html', 'buy');
});</script></body></html>