input.bindPointer
bindPointer(button: number, keyCode: input.KEY) → {}
Associate a pointer event to a keycode
Left button – 0
Middle button – 1
Right button – 2
// enable the keyboard
me.input.bindKey(me.input.KEY.X, "shoot");
// map the left button click on the X key (default if the button is not specified)
me.input.bindPointer(me.input.KEY.X);
// map the right button click on the X key
me.input.bindPointer(me.input.pointer.RIGHT, me.input.KEY.X);
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
button | number |
<optional> |
input.pointer.LEFT |
(accordingly to W3C values : 0,1,2 for left, middle and right buttons) |
keyCode | input.KEY |
Type | Description |
---|