From owner-freebsd-questions@FreeBSD.ORG Thu Nov 10 19:13:13 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C575B1065670 for ; Thu, 10 Nov 2011 19:13:13 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from asmtpout024.mac.com (asmtpout024.mac.com [17.148.16.99]) by mx1.freebsd.org (Postfix) with ESMTP id A74558FC17 for ; Thu, 10 Nov 2011 19:13:13 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from cswiger1.apple.com ([17.209.4.71]) by asmtp024.mac.com (Oracle Communications Messaging Server 7u4-23.01 (7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPSA id <0LUG00L0RLDGKV60@asmtp024.mac.com> for freebsd-questions@freebsd.org; Thu, 10 Nov 2011 11:12:52 -0800 (PST) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.5.7110,1.0.211,0.0.0000 definitions=2011-11-10_01:2011-11-09, 2011-11-09, 1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=6.0.2-1012030000 definitions=main-1111100180 From: Chuck Swiger In-reply-to: <86ipmsl1ee.fsf@kropotkin.hack.org> Date: Thu, 10 Nov 2011 11:12:51 -0800 Message-id: <0953CCAB-C764-413C-9A13-ED5E77D1AEC4@mac.com> References: <4EB88225.9020702@bredband.net> <20111108205600.7a8e0205.freebsd@edvax.de> <20111108215114.24d336e6.freebsd@edvax.de> <4EBA5EBD.7020501@bredband.net> <86pqh1njww.fsf@kropotkin.hack.org> <30329CB5-03FA-4717-81E6-43CC9CE43713@mac.com> <86ipmsl1ee.fsf@kropotkin.hack.org> To: Michael Cardell Widerkrantz X-Mailer: Apple Mail (2.1084) Cc: freebsd-questions@freebsd.org Subject: Re: X server and xinit works excellent....almost. X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Nov 2011 19:13:13 -0000 On Nov 10, 2011, at 2:25 AM, Michael Cardell Widerkrantz wrote: >> True for PS/2, but not true for USB-- the USB Vendor & Product ID can >> identify different keyboard types and let you infer the country. > > I'm sorry I was unclear. I meant the USB device doesn't say what > physical keyboard layout it has in any standardized way. There is > nothing in the USB protocol about it. That's fairly said-- you'd have to query a database of vendor+product ids and see whether you can determine that a particular keyboard is for a given country and/or language. If you don't find a match, there isn't a good way of identifying the region of the device just via USB protocol. > The product ID code might tell you something if you have a large > database and the USB product ID is indeed different between two physical > layouts. It might not be. For instance, while ANSI keyboards and ISO > keyboards are bound to have different USB product IDs because of > actually physical differences in the number of keys, the only thing that > differs between, say, a German keyboard and a Swedish keyboard of the > same model is what is printed on the keycaps. A vendor might see these > as the same USB product ID. Different keycaps means a different product SKU, at least. If they use the same USB product ID, then you're going to have to define a keymap file / xmodmap / etc to associate the scan codes with the right character that's printed on the keycaps. FreeBSD's users generally are more technically inclined and might be willing to deal with this, but even so, I suspect that most folks would appreciate the system trying to figure out that an AZERTY keyboard layout means French, that JIS means Japanese, that QWERTZ probably indicates German / Swiss / Hungarian, etc. To my mind, though, that's a fallback for when you have a KVM or a PS/2-to-USB converter or suchlike in the way that prevents the device from being correctly recognized. Regards, -- -Chuck