event.getModifiers() != JSEvent.MODIFIER_SHIFT

Forum to discuss the Web client version of Servoy.

event.getModifiers() != JSEvent.MODIFIER_SHIFT

Postby stefanoni » Mon Oct 11, 2010 12:51 pm

in the wicki i found the following example:
Code: Select all
if (event.getModifiers() & JSEvent.MODIFIER_SHIFT)

But in my debugger i found out, that when i click a button with Shift-Click

event.getModifiers() values 17
JSEvent.MODIFIER_SHIFT values 1

so this example-code alway ends with a case false.

Thanke you for any suggestions about this ?
Alessandro Stefanoni ---- gigdoodle.ch ---- stefanoni.ch ----
Stefanoni Informatik Gmbh, CH-8200 Schaffhausen
Switzerland
stefanoni
 
Posts: 313
Joined: Fri Jul 23, 2010 3:17 pm
Location: Switzerland

Re: event.getModifiers() != JSEvent.MODIFIER_SHIFT

Postby rgansevles » Mon Oct 11, 2010 3:07 pm

Alessandro,

See my previous post, it just checks the shift bit, other bits are ignored.

Rob
Rob Gansevles
Servoy
User avatar
rgansevles
 
Posts: 1927
Joined: Wed Nov 15, 2006 6:17 pm
Location: Amersfoort, NL


Return to Servoy Web Client

Who is online

Users browsing this forum: No registered users and 7 guests