Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #10102

Re: detect if user can generate key events ?

From "Jukka K. Korpela" <jkorpela@cs.tut.fi>
Newsgroups comp.lang.javascript
Subject Re: detect if user can generate key events ?
Date 2012-01-10 11:35 +0200
Organization A noiseless patient Spider
Message-ID <jeh0pu$4uu$1@dont-email.me> (permalink)
References <slrnjgo00f.2de.peter@box8.pjb.com.au>

Show all headers | View raw


2012-01-10 11:08, Peter Billam wrote:

> I've got this page:
>    http://www.pjb.com.au/esperanto/eo_en.html:
> which handles onkeydown events.

I don’t quite see why. It seems to read some input and run a lookup on 
it, then write the match, if any. There does not seem to be any 
immediate visible effect when the circumflex ^ is used, so I don’t see 
why you don't act on just on Enter and perform string manipulation on 
the input. And if you do the normal thing of using a text input box, 
users can also use cut and paste.

The page uses one of the old methods of writing Esperanto in Ascii only, 
the “x notation.” As implemented, the logic of the page means that even 
though I can normally perfectly well write Esperanto as such, using e.g. 
c with circumflex (ĉ), on this page it won’t work, because I use a dead 
key to add a circumflex on a letter. (That’s usual when using European 
keyboards, though most of them can handle just a small number of 
diacritic + letter combinations.)

> Is there a way to detect if the user can generate kbd events ?

Hardly. How could JavaScript detect whether I just poured coffee over my 
keyboard so that it stopped working and I need to use the mouse now? 
(This is not [only] a joke; programmed tests on possibilities of doing 
something are inherently limited and can only test some technical aspects.)

-- 
Yucca, http://www.cs.tut.fi/~jkorpela/

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

detect if user can generate key events ? Peter Billam <peter@www.pjb.com.au> - 2012-01-10 09:08 +0000
  Re: detect if user can generate key events ? "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2012-01-10 11:35 +0200
    Re: detect if user can generate key events ? Peter Billam <peter@www.pjb.com.au> - 2012-01-10 11:25 +0000
      Re: detect if user can generate key events ? "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2012-01-10 13:47 +0200
    Re: detect if user can generate key events ? Swifty <steve.j.swift@gmail.com> - 2012-01-10 12:33 +0000
      Re: detect if user can generate key events ? Captain Paralytic <paul_lautman@yahoo.com> - 2012-01-10 05:30 -0800

csiph-web