docs/components/logitech-mx-ink-controls.md
The logitech-mx-ink-controls component interfaces with the Logitech MX Ink tracked pen. It
wraps the tracked-controls component while adding button
mappings, events, and a pencil model.
<a-entity logitech-mx-ink-controls="hand: left"></a-entity>
<a-entity logitech-mx-ink-controls="hand: right"></a-entity>
| Property | Description | Default Value |
|---|---|---|
| hand | The hand that will be tracked (i.e., right, left). | left |
| model | Whether the Touch controller model is loaded. | true |
| Event Name | Description |
|---|---|
| tiptouchstart | Tip touched. |
| tiptouchend | Tip no longer touched. |
| tipchanged | Tip changed. |
| frontdown | Front button pressed. |
| frontup | Front button released. |
| frontchanged | Front button changed. |
| reardown | Rear button pressed. |
| rearup | Rear button released. |
| rearchanged | Rear button changed. |
Listen to the tipchanged event.
<a-entity logitech-mx-ink-controls="hand: left" tip-logging></a-entity>
<a-entity logitech-mx-ink-controls="hand: right" tip-logging></a-entity>
AFRAME.registerComponent('tip-logging',{
init: function () {
this.el.addEventListener('tipchanged', this.tipChanged);
},
tipChanged: function (evt) {
console.log("Pen tip changed");
}
});