From owner-freebsd-questions@FreeBSD.ORG Tue Feb 24 22:37:43 2009 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 78BBF1065670 for ; Tue, 24 Feb 2009 22:37:43 +0000 (UTC) (envelope-from patfbsd@davenulle.org) Received: from smtp.lamaiziere.net (net.lamaiziere.net [91.121.44.19]) by mx1.freebsd.org (Postfix) with ESMTP id 3AE088FC16 for ; Tue, 24 Feb 2009 22:37:42 +0000 (UTC) (envelope-from patfbsd@davenulle.org) Received: from baby-jane.lamaiziere.net (66.10.87-79.rev.gaoland.net [79.87.10.66]) by smtp.lamaiziere.net (Postfix) with ESMTPA id EC807633302; Tue, 24 Feb 2009 23:37:41 +0100 (CET) Received: from baby-jane.lamaiziere.net (localhost [127.0.0.1]) by baby-jane.lamaiziere.net (Postfix) with ESMTP id 16E19D1BF; Tue, 24 Feb 2009 23:37:43 +0100 (CET) Date: Tue, 24 Feb 2009 23:37:42 +0100 From: Patrick =?ISO-8859-15?Q?Lamaizi=E8re?= To: carnage Message-ID: <20090224233742.6601b7d5@baby-jane.lamaiziere.net> In-Reply-To: <93e00050902241328x6867e315vd7c3b63c46d685c0@mail.gmail.com> References: <93e00050902241328x6867e315vd7c3b63c46d685c0@mail.gmail.com> Organization: /dave/nulle X-Mailer: Claws Mail 3.7.0 (GTK+ 2.14.7; i386-portbld-freebsd7.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: Determining scancodes for obscure keyboard to modify keymap 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: Tue, 24 Feb 2009 22:37:43 -0000 Le Tue, 24 Feb 2009 14:28:54 -0700, carnage : > I'm wondering how to go about determining the scancodes for keys on > keypress. > > I am looking to remap an apple usb keyboard (a1048). It has F13-16, 3 > volume control keys and an eject key but no scroll lock, num lock, > pause/break, etc. I'm wondering how I would go about changing some > of these not so useful keys into useful keys. > > The keymap files in /usr/share/syscons/keymaps seem easy enough to > modify but I am unsure of how to determine what the scancodes > associated with the actual keys on keypress are. I asked for this some times ago without any reply. Finally I added some printf in the kbd driver. I don't remember exactly where, I think it was in the function genkbd_keyaction() in kdb.c (something like printf("%i - ", keycode) That's ugly... Is there a better way to get the scancode?