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" <[email protected]> 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 <[email protected]> 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---
