icheck icon indicating copy to clipboard operation
icheck copied to clipboard

shiftkey is not working

Open arenadeveloper opened this issue 8 years ago • 2 comments

Hi i am trying to check if user has pressed shiftkey with click

$('input').on('ifClicked', function(event){ console.log(event.shiftKey); var box = $('.i-checks'); });

it always returns undefined. Can you help me. Another thing is the multiselect feature available with pressing shiftkey.

arenadeveloper avatar Jun 10 '16 09:06 arenadeveloper

Same issue here. JS console shows that the event doesn't even have the which or keyCode properties.

DixxieFlatline avatar Oct 11 '16 08:10 DixxieFlatline

Here's the fix:

var shiftKey = window.event.shiftKey;

This will bring in the global window event object, which will detect if the shift key is pressed down.

NoMan2000 avatar Dec 11 '18 19:12 NoMan2000