Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #24345

Re: Is it possible to trap the right mouse click in a <canvas>?

From Ed Jay <edMbj@aes-intl.com>
Newsgroups comp.lang.javascript
Subject Re: Is it possible to trap the right mouse click in a <canvas>?
Date 2014-05-22 08:55 -0700
Message-ID <0e7sn9135aooge27ke7o5msbel5fa68k3v@4ax.com> (permalink)
References <34b73d82-8a02-46e2-8462-9e24a568609d@googlegroups.com> <vhtpn9hkbcgn4gukvedr4a4on42ekc6l5v@4ax.com> <33226af2-793a-416c-9314-59ba8b60d2b1@googlegroups.com>

Show all headers | View raw


bit-naughty@hotmail.com wrote:

>On Thursday, May 22, 2014 12:26:24 AM UTC+5:30, Ed Jay wrote:
>
>> 
>> canvas.addEventListener("mousedown", getMouseClick, false);
>> 
>> 
>> 
>> function getMouseClick(event) {
>> 
>> if (event.which == 3) {
>> 
>> //do your thing//
>> 
>> }
>> 
>> }
>>
>Thanks Ed! :)
>
>What does "which" mean?
>
Which mouse button is pressed.
1 = left
2 = middle
3 = right

-- 
Ed Jay (remove 'M' to reply by email)

Win the War Against Breast Cancer.
Knowing the facts could save your life. 
http://www.breastthermography.info

Back to comp.lang.javascript | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Is it possible to trap the right mouse click in a <canvas>? bit-naughty@hotmail.com - 2014-05-21 07:34 -0700
  Re: Is it possible to trap the right mouse click in a <canvas>? Ed Jay <edMbj@aes-intl.com> - 2014-05-21 11:56 -0700
    Re: Is it possible to trap the right mouse click in a <canvas>? bit-naughty@hotmail.com - 2014-05-22 06:22 -0700
      Re: Is it possible to trap the right mouse click in a <canvas>? Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2014-05-22 16:42 +0200
      Re: Is it possible to trap the right mouse click in a <canvas>? Ed Jay <edMbj@aes-intl.com> - 2014-05-22 08:55 -0700
  Re: Is it possible to trap the right mouse click in a <canvas>? rescattered@gmail.com - 2014-05-21 13:08 -0700
    Re: Is it possible to trap the right mouse click in a <canvas>? Ed Jay <edMbj@aes-intl.com> - 2014-05-21 16:35 -0700
      Re: Is it possible to trap the right mouse click in a <canvas>? John C <rescattered@gmail.com> - 2014-05-21 18:49 -0700

csiph-web