Hi,

> Only thing left for me to complain is that I still don't know what
> names like KEY_DOWN are for...

They're for the keyboard events; see the link in my previous post.

> ...and that
> there's nothing in the manual (hint).

Isn't there?[1, fourth paragraph]  But by all means, feel free to post
a documentation ticket to Lighthouse with a patch in markdown format,
contributions are welcome. :-) Details.[2]

[1] http://prototypejs.org/api/event
[2] http://prototypejs.org/contribute
--
T.J. Crowder
tj / crowder software / com
Independent Software Engineer, consulting services available


On Aug 25, 1:07 pm, Ooypunk <ooyp...@gmail.com> wrote:
> OK, then I'll go with that. Thanks!
>
> Only thing left for me to complain is that I still don't know what
> names like KEY_DOWN are for, or how they should be used, and that
> there's nothing in the manual (hint).
>
> On Aug 25, 11:37 am, "T.J. Crowder" <t...@crowdersoftware.com> wrote:
>
>
>
> > Hi,
>
> > If you want to know whether the control key was down when the mouse
> > was clicked, then yes, the ctrlKey property of the mouse click event
> > object is what you want.
>
> >     element.observe('click', function(event) {
> >         if (event.ctrlKey) {
> >             // Something cool here
> >         }
> >     }
>
> >https://developer.mozilla.org/en/DOM/event.ctrlKey
>
> > If you're looking to receive an event (separate from the click) when
> > the control key is pressed, that varies quite a bit by 
> > browser:http://unixpapa.com/js/key.html
>
> > But my impression is that you're just looking for it when the mouse is
> > clicked, which is much more reliable.
>
> > HTH,
> > --
> > T.J. Crowder
> > tj / crowder software / com
> > Independent Software Engineer, consulting services available
>
> > On Aug 25, 12:09 am, Ooypunk <ooyp...@gmail.com> wrote:
>
> > > Hi,
>
> > > I was looking for a way to capture a mouse-click plus ctrl-button. As
> > > I am using Prototype now for some time (it's great!), I thought
> > > Prototype could help me with this too.
> > > Sure, the manual is clear enough of how to capture a mouse-click event
> > > (that works fine here), but how about the ctrl-button? According to
> > > the manual, there's a list of key codes to be used (KEY_DOWN, for
> > > example), but there is no KEY_CTRL and there is nowhere to be found
> > > how they should be used.
> > > It says it's self explanatory, but for me it isn't. :(
>
> > > I think I can get it to work with event.ctrlKey, but I have a feeling,
> > > this is not the way.
>
> > > Thanks in advance.
>
> > > Ooypunk
>
> > > PS. I hope I made my problem clear enough, I know I'm not very good at
> > > explaining, especially because english is not my mother tongue.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to