Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #10104
| 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 13:47 +0200 |
| Organization | A noiseless patient Spider |
| Message-ID | <jeh8g3$9qb$1@dont-email.me> (permalink) |
| References | <slrnjgo00f.2de.peter@box8.pjb.com.au> <jeh0pu$4uu$1@dont-email.me> <slrnjgo81g.2sa.peter@box8.pjb.com.au> |
2012-01-10 13:25, Peter Billam wrote: > I wanted to leave myself the option of reacting to partial lines, > or only to certain characters, and also to learn about kbd events, > to implement an imitation vi etc. Learning is fine, but KISS (Keep it simple, sir!) rules when you wish to produce something that others can use. >> 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, > > Indeed, and it's a big issue with cut and paste where you > don't have the freedom to type. This point of mine was not about cut and paste; it was about keyboard input that uses dead keys. Acting on key presses can be useful in some contexts, but it should not prevent the user from typing normally. > Of course if the page handled > diacriticals I'd still want to respect the x notation; > it's very ergonomic on non-esperanto keyboards. You could still handle both the “x notation” and the “h notation,” if you used just a text input field and performed simple string manipulation (actually, just simple replacements) on it. Accepting cx or ch for ĉ should not mess things up when the user actually types ĉ. Technically, you could effectively turn “x” to an equivalent of a dead key (e.g., when the user types “x” after “c,” the “c” turns to “ĉ” immediately), but I think this would fall into the category of outsmarting oneself. A less intrusive way would be to add small buttons for writing characters like “ĉ”, which is fairly simple, cf. to the Turkish input gadget at http://bytelevelbooks.com/code/javascript/turkish-input.html I’m not saying that such buttons have high usability; I’m saying that they hardly disturb anyone, and they offer an intuitively obvious way of entering special characters that might be needed in a specific context. -- Yucca, http://www.cs.tut.fi/~jkorpela/
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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