Path: csiph.com!weretis.net!feeder4.news.weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Thomas 'PointedEars' Lahn Newsgroups: comp.lang.javascript Subject: Re: Interrogation of Shift-Key state Date: Sat, 25 Jun 2016 17:18:27 +0200 Organization: PointedEars Software (PES) Lines: 22 Message-ID: <2962054.LZWGnKmheA@PointedEars.de> References: Reply-To: Thomas 'PointedEars' Lahn Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit X-Trace: solani.org 1466867908 25679 eJwNyMkBwDAIA7CVGjCGdTjC/iOkesqUh+2gEba2kx7nyj/WUhB8U4u7SCq7LnTbzSe5GYJ4KMQRkw== (25 Jun 2016 15:18:28 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Sat, 25 Jun 2016 15:18:28 +0000 (UTC) User-Agent: KNode/4.14.2 X-User-ID: eJwFwYEBwCAIA7CXUNsC5wiO/09YwqOldogCh+MVJaX2S7L5AmOOuFFeNHA5rLu+cyosc5teL/iriX1B/jdIFLQ= Cancel-Lock: sha1:UM+2fjg67AbiLiOHfISQ1XnUgvg= X-NNTP-Posting-Host: eJwNxcEBwCAIA8CVQoUI4wjC/iPY+5wtCmsrjWpj0+mQ/P/6qNMScgtHO03G40b1CqAaPjjcDyzqEYg= Xref: csiph.com comp.lang.javascript:30723 Janis Papanagnou wrote: > I want to interrogate the boolean state of the Shift-Key (pressed or not). > > I learned it is possible to define event-handlers to control keyup/keydown > events, then I could adjust some global variable that I can interrogate > where I need that information. But that is bulky and seems unnecessary(?) > complex. It would be error-prone and unnecessary, indeed. > My application context is a function that is triggered when a button is > pressed. Is there a simple way to just interrogate the Shift-Key status > in that function? Yes. -- PointedEars FAQ: | SVN: Twitter: @PointedEars2 | ES Matrix: Please do not cc me. / Bitte keine Kopien per E-Mail.