I'm using EventPreview to trap click events on draggables and query
the keyboard to determine whether it's a "toggle-click" (i.e., ctrl-
click) or "extend-click" (i.e., shift-click). The standard click event
doesn't expose the Event object and thus I couldn't call
KeyboardListenerCollection.getKeyboardModifiers to get the modifier
bit vector.
Dragging & Dropping of multiply selected items in an IndexedFlowPanel
works nicely on Windows with IE and Firefox. However, I'm stuck on the
Macintosh.
The convention on the Mac is that "toggle-click" is performed with the
Command Key (a.k.a., Apple Key or clover key). However, I can't figure
out how to detect the Command Key.
Any suggestions?
-- Bosco
Fred, here's the latest progress regarding multiple selection.
I'm using EventPreview to trap click events on draggables and query
the keyboard to determine whether it's a "toggle-click" ( i.e., ctrl-
In the IE/Firefox case, the EventPreview interface had full access to
the Event object and thus I could call
KeyboardListenerCollection.getKeyboardModifiers(Event) to get a bit
vector of the keyboard modifiers. I'm testing for
KeyboardListener.MODIFIER_META but the Mac Command key isn't
triggering it.
-- Bosco
On Aug 8, 4:40 pm, "Fred Sauer" <f...@allen-sauer.com> wrote:
> Bosco,
>
> How did you do it in the IE/Firefox case? Assuming there are no 'modifier'
> bits for you to access, you could setup a global onkeydown/press listener
> (depending on what detects the command key). I proposed a starting point in
> this thread:
>
> http://groups.google.com/group/Google-Web-Toolkit/browse_thread/threa...
>
> Also, I should note that GWT 1309 provides access to the current event
> object, in case you hadn't seen that yet:
> http://code.google.com/p/google-web-toolkit/issues/detail?id=1309
>
> Fred
>
> On 8/8/07, boscomonkey <boscomon...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Fred, here's the latest progress regarding multiple selection.
>
> > I'm using EventPreview to trap click events on draggables and query
> > the keyboard to determine whether it's a "toggle-click" (i.e., ctrl-
> > click) or "extend-click" (i.e., shift-click). The standard click event
> > doesn't expose the Event object and thus I couldn't call
> > KeyboardListenerCollection.getKeyboardModifiers to get the modifier
> > bit vector.
>
> > Dragging & Dropping of multiply selected items in an IndexedFlowPanel
> > works nicely on Windows with IE and Firefox. However, I'm stuck on the
> > Macintosh.
>
> > The convention on the Mac is that "toggle-click" is performed with the
> > Command Key (a.k.a., Apple Key or clover key). However, I can't figure
> > out how to detect the Command Key.
>
> > Any suggestions?
>
> > -- Bosco
>
> --
> Fred Sauer
> f...@allen-sauer.com- Hide quoted text -
>
> - Show quoted text -
The EventPreview is very similar in style to a global onkeydown/press
listener. Except that I'm just looking at clicks (instead of key
events) and checking for keyboard modifier. This seemed to be easier
than keeping track of keydowns/ups and detecting clicks.
In the IE/Firefox case, the EventPreview interface had full access to
the Event object and thus I could call
KeyboardListenerCollection.getKeyboardModifiers (Event) to get a bit
public native boolean eventGetMetaKey(Event evt) /*-{
return !!evt.getMetaKey;
}-*/;
Whereas if I change it to
public native boolean eventGetMetaKey(Event evt) /*-{
return evt.metaKey ? true : false;
}-*/;
Then, the meta key shows up. Grrrrrr.
-- Bosco
On Aug 8, 6:34 pm, "Fred Sauer" <f...@allen-sauer.com> wrote:
> Bosco,
>
> From what I can tell, KeyboardListenerCollection uses
> DOM.eventGetMetaKey(event)
> which uses DOMImpl to check event.metaKey. That all appears to be correct
> (based on some online references), although I don't have a mac to test on.
>
> Fred
>
> On 8/8/07, boscomonkey <boscomon...@gmail.com> wrote:
>
>
>
>
>
>
>
> > The EventPreview is very similar in style to a global onkeydown/press
> > listener. Except that I'm just looking at clicks (instead of key
> > events) and checking for keyboard modifier. This seemed to be easier
> > than keeping track of keydowns/ups and detecting clicks.
>
> > In the IE/Firefox case, the EventPreview interface had full access to
> > the Event object and thus I could call
> > KeyboardListenerCollection.getKeyboardModifiers(Event) to get a bit
!!evt.metaKey
construct works. It's just that GWT had a typo
!!evt.getMetaKey
> > > > > Any suggestions?- Hide quoted text -
http://code.google.com/p/google-web-toolkit/issues/detail?id=1118
> > - Show quoted text -- Hide quoted text -