Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #39197
| Newsgroups | comp.lang.javascript |
|---|---|
| Date | 2020-11-26 08:15 -0800 |
| References | <f0dd6201-439b-4bfa-a5b5-488fdd23e0c2n@googlegroups.com> |
| Message-ID | <de56de23-8ae2-45fb-b0e6-a0b00a652da6n@googlegroups.com> (permalink) |
| Subject | Re: ASCII unicode values |
| From | Jonas Thörnvall <jonas.thornvall@gmail.com> |
torsdag 26 november 2020 kl. 16:35:08 UTC+1 skrev Jonas Thörnvall: > Why does not javascript follow the OS and language implementation of its reflection on keypresses, why does it use some internal "charcode?" set where your keypresses do not follow the way you use them? > > key = e.keyCode ? e.keyCode : e.which; > character= String.fromCharCode(key); > > In 99.999% of programming cases people probably want the mapping to be done just how the keyboard usually work within OS? > > And if i as programmer can do the mapping, why is it not an option to chose "a natural" mapping, that actually reflect "how the OS" does it? > > Every project that use keyboard input have to write the same/similar mapping code? Isn't that rather ridiculous? > > Use the OS ,mapping seem to me to be less job to implement, then the awkward way it is implemented now? Probably should said i am talking about the charcodes catched when you press a key, and echo them back. Why isn't it the same as for example the textarea or text input in HTML why does not the charcodes reflect those.
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
ASCII unicode values Jonas Thörnvall <jonas.thornvall@gmail.com> - 2020-11-26 07:35 -0800
Re: ASCII unicode values Jonas Thörnvall <jonas.thornvall@gmail.com> - 2020-11-26 08:15 -0800
Re: ASCII unicode values Jonas Thörnvall <jonas.thornvall@gmail.com> - 2020-11-26 12:07 -0800
Re: ASCII unicode values "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2020-11-26 22:25 +0100
Re: ASCII unicode values Jonas Thörnvall <jonas.thornvall@gmail.com> - 2020-11-26 13:46 -0800
Re: ASCII unicode values "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2020-11-27 00:08 +0100
Re: ASCII unicode values John-Paul Stewart <jpstewart@personalprojects.net> - 2020-11-26 19:02 -0500
Re: ASCII unicode values Jonas Thörnvall <jonas.thornvall@gmail.com> - 2020-11-27 10:43 -0800
Re: ASCII unicode values Jonas Thörnvall <jonas.thornvall@gmail.com> - 2020-11-28 13:54 -0800
Re: ASCII unicode values luserdroog <luser.droog@gmail.com> - 2020-11-28 18:59 -0800
csiph-web