From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David De La Harpe Golden Newsgroups: gmane.emacs.devel Subject: Re: How to recognize keyboard insertion? Date: Sun, 01 Nov 2009 05:24:44 +0000 Message-ID: <4AED1B9C.5070106@harpegolden.net> References: <83vdhvd096.fsf@gnu.org> <4AEC6CC5.3010009@harpegolden.net> <83skczcwes.fsf@gnu.org> <4AEC75C3.900@harpegolden.net> <83r5sjctup.fsf@gnu.org> <4AEC8F4A.8070205@harpegolden.net> <83my37coyw.fsf@gnu.org> <4AECA148.4090809@harpegolden.net> <83ljircl6s.fsf@gnu.org> <4AECB0E0.3020702@harpegolden.net> <83k4yadi4f.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1257053117 27086 80.91.229.12 (1 Nov 2009 05:25:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 1 Nov 2009 05:25:17 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 01 06:25:10 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1N4Sw9-0001sV-Q0 for ged-emacs-devel@m.gmane.org; Sun, 01 Nov 2009 06:25:10 +0100 Original-Received: from localhost ([127.0.0.1]:48161 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N4Sw9-0006py-4k for ged-emacs-devel@m.gmane.org; Sun, 01 Nov 2009 01:25:09 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N4Sw1-0006p9-2w for emacs-devel@gnu.org; Sun, 01 Nov 2009 01:25:01 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N4Svv-0006lC-Mx for emacs-devel@gnu.org; Sun, 01 Nov 2009 01:24:59 -0400 Original-Received: from [199.232.76.173] (port=37039 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N4Svv-0006ks-GY for emacs-devel@gnu.org; Sun, 01 Nov 2009 01:24:55 -0400 Original-Received: from harpegolden.net ([65.99.215.13]:59116) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N4Svt-0000cY-EQ; Sun, 01 Nov 2009 01:24:53 -0400 Original-Received: from [87.198.54.205] (87-198-54-205.ptr.magnet.ie [87.198.54.205]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "David De La Harpe Golden", Issuer "David De La Harpe Golden Personal CA rev 3" (verified OK)) by harpegolden.net (Postfix) with ESMTP id 41F1581CB; Sun, 1 Nov 2009 05:24:52 +0000 (GMT) User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090701) In-Reply-To: <83k4yadi4f.fsf@gnu.org> X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:116547 Archived-At: Eli Zaretskii wrote: > OK, but knowing whether to mirror or not requires information about > whether a given keyboard already mirrors characters. Can this be > found somewhere, or queried at run time? [Only if you want to do it automatically, if it was a user preference the user would just be setting ltr and rtl current input methods as desired? Or maybe it would be more intuitive to use just one input method, e.g. hebrew-parenjuggle, expanding the input method layer to support rtl/ltr context sensitive definitions for individual rules] It is possible to find out if the current os keyboard layout is us or hebrew or whatever which could be coupled with prior information that it is standard for certain layouts to mirror. I don't know exhaustively which ones do, though a lot could probably be extracted by inspection of the xkb database. If OTOH you wanted to find out whether the code a keypress returns under the current os layout actually corresponds to the glyph printed on the keyboard, you can't really - Only the user knows that at present as current keyboards don't really inform the computer what glyphs they have physically printed on them AFAIK (though it would certainly be technically feasible for a keyboard to e.g. say "Hi, I am physically a standard british qwerty 105 key keyboard" to a computer with some well-defined wire protocol, I don't think typical PC ones do).