Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #31120
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: Interrogation of Shift-Key state |
| Date | 2016-08-20 07:23 +0200 |
| Organization | PointedEars Software (PES) |
| Message-ID | <4981358.DvuYhMxLoT@PointedEars.de> (permalink) |
| References | (1 earlier) <9a42c75f-3239-4a70-9ce3-7434db0edd00@googlegroups.com> <nkmg47$1b8k$2@gioia.aioe.org> <d052c5aa-94b2-49f9-a493-ea81296acba9@googlegroups.com> <2365735.mvXUDI8C0e@PointedEars.de> <12d9fda2-1369-473e-8415-3739eb04d6a4@googlegroups.com> |
Michael Haufe (TNO) wrote:
> On Thursday, August 18, 2016 at 1:29:19 PM UTC-5, Thomas 'PointedEars'
> Lahn wrote:
>> Michael Haufe (TNO) wrote:
>> > So depending on your platform targets, there is a good chance you're
>> > going to be getting some contradictory information in some cases
>> > (keydown followed by a keypress and possibly by keyup somewhere in
>> > there in repetition)
>> Name one.
>
> <https://bugzilla.mozilla.org/show_bug.cgi?id=602812>
There is nothing there that corroborates your belief.
>> > Which means you are now looking at the keypress event. Luckily, the
>> > event that is raised has a property called "shiftKey" which you can
>> > interrogate.
>>
>> The *proprietary/legacy* “keypress” event is not fired for non-character
>> keys; never has been. This is how you can tell apart, for example, the
>> right arrow key ({keyCode: 39, charCode: 0}) and the apostrophe key
>> ({keyCode: 39, charCode: 39}}; on my laptop with Swiss German keyboard
>> layout, YMMV).
>
> See the above link
BTDT. It says that *in Firefox*
- “On Windows, CapsLock, NumLock and ScrollLock [did not dispatch the
‘keypress’] event.
- On Linux, CapsLock, NumLock and ScrollLock [dispatched the ‘keypress’]
event.
- On Mac, CapsLock dispatched only [the ‘keydown’] event, [the] NumLock key
(without Fn key, i.e., external keyboard's NumLock key) dispatched the
‘keydown’, ‘keypress’, and ‘keyup’ events. The NumLock key with Fn key
and ScrollLock key don't dispatch any key events.”
from before “2010-10-08 01:55 PDT” when that bug was reported to before
“2013-07-23 11:04:32 PDT” when it was FIXED.
Who cares?
“Currently, neither modifier keys nor dead keys cause keypress event(s).”
(AISB)
>> > So now your left with the problem of telling the difference between
>> > someone holding down the shift key and someone mashing on the keyboard
>> > in succession.
>> Most certainly not.
>
> Again, see the above link.
There is neither a mention that the “keyup” event would be fired while the
Shift key were held down, nor is the Shift key mentioned there.
--
PointedEars
FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-matrix>
Please do not cc me. / Bitte keine Kopien per E-Mail.
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Interrogation of Shift-Key state Janis Papanagnou <janis_papanagnou@hotmail.com> - 2016-06-25 14:59 +0200
Re: Interrogation of Shift-Key state Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-06-25 17:18 +0200
Re: Interrogation of Shift-Key state Janis Papanagnou <janis_papanagnou@hotmail.com> - 2016-06-25 19:47 +0200
Re: Interrogation of Shift-Key state Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-06-25 20:07 +0200
Re: Interrogation of Shift-Key state "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-06-25 08:51 -0700
Re: Interrogation of Shift-Key state Janis Papanagnou <janis_papanagnou@hotmail.com> - 2016-06-25 19:47 +0200
Re: Interrogation of Shift-Key state Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-06-25 20:17 +0200
Re: Interrogation of Shift-Key state Janis Papanagnou <janis_papanagnou@hotmail.com> - 2016-06-25 21:16 +0200
Re: Interrogation of Shift-Key state Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-06-25 22:33 +0200
Re: Interrogation of Shift-Key state Janis Papanagnou <janis_papanagnou@hotmail.com> - 2016-06-26 00:49 +0200
Re: Interrogation of Shift-Key state Tim Streater <timstreater@greenbee.net> - 2016-06-26 00:06 +0100
Re: Interrogation of Shift-Key state Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-06-26 11:05 +0200
Re: Interrogation of Shift-Key state "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-06-25 12:17 -0700
Re: Interrogation of Shift-Key state "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-06-25 12:23 -0700
Re: Interrogation of Shift-Key state Janis Papanagnou <janis_papanagnou@hotmail.com> - 2016-06-26 00:34 +0200
Re: Interrogation of Shift-Key state Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-08-18 20:29 +0200
Re: Interrogation of Shift-Key state "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-08-18 15:17 -0700
Re: Interrogation of Shift-Key state Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-08-20 07:23 +0200
Re: Interrogation of Shift-Key state "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-08-20 00:03 -0700
Re: Interrogation of Shift-Key state Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-08-20 11:48 +0200
Re: Interrogation of Shift-Key state "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-08-25 13:39 -0700
Re: Interrogation of Shift-Key state "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-06-25 12:20 -0700
Re: Interrogation of Shift-Key state Tim Streater <timstreater@greenbee.net> - 2016-06-25 22:33 +0100
Re: Interrogation of Shift-Key state Janis Papanagnou <janis_papanagnou@hotmail.com> - 2016-06-26 01:18 +0200
Re: Interrogation of Shift-Key state Tim Streater <timstreater@greenbee.net> - 2016-06-26 00:23 +0100
Re: Interrogation of Shift-Key state Janis Papanagnou <janis_papanagnou@hotmail.com> - 2016-06-26 01:37 +0200
Re: Interrogation of Shift-Key state Tim Streater <timstreater@greenbee.net> - 2016-06-26 09:41 +0100
Re: Interrogation of Shift-Key state - workaround Janis Papanagnou <janis_papanagnou@hotmail.com> - 2016-06-26 00:33 +0200
Re: Interrogation of Shift-Key state - workaround "Christoph M. Becker" <cmbecker69@arcor.de> - 2016-06-26 00:53 +0200
Re: Interrogation of Shift-Key state - workaround Janis Papanagnou <janis_papanagnou@hotmail.com> - 2016-06-26 01:31 +0200
Re: Interrogation of Shift-Key state - workaround "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-06-25 16:52 -0700
Re: Interrogation of Shift-Key state - workaround "Christoph M. Becker" <cmbecker69@arcor.de> - 2016-06-26 01:56 +0200
Re: Interrogation of Shift-Key state - workaround "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-06-25 16:50 -0700
Re: Interrogation of Shift-Key state Joao Rodrigues <jr@none.com> - 2016-06-25 20:34 -0300
csiph-web