From owner-freebsd-questions@FreeBSD.ORG Tue Feb 24 23:22:31 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 633A41065674 for ; Tue, 24 Feb 2009 23:22:31 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) by mx1.freebsd.org (Postfix) with ESMTP id 221D98FC17 for ; Tue, 24 Feb 2009 23:22:31 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r55.edvax.de (port-92-196-52-176.dynamic.qsc.de [92.196.52.176]) by mx01.qsc.de (Postfix) with ESMTP id BB4E13CBD7; Wed, 25 Feb 2009 00:22:26 +0100 (CET) Received: from r55.edvax.de (localhost [127.0.0.1]) by r55.edvax.de (8.14.2/8.14.2) with SMTP id n1ONMICC001607; Wed, 25 Feb 2009 00:22:18 +0100 (CET) (envelope-from freebsd@edvax.de) Date: Wed, 25 Feb 2009 00:22:18 +0100 From: Polytropon To: carnage Message-Id: <20090225002218.a25136a0.freebsd@edvax.de> In-Reply-To: <93e00050902241328x6867e315vd7c3b63c46d685c0@mail.gmail.com> References: <93e00050902241328x6867e315vd7c3b63c46d685c0@mail.gmail.com> Organization: EDVAX X-Mailer: Sylpheed 2.4.7 (GTK+ 2.12.1; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Feb 2009 23:22:31 -0000 On Tue, 24 Feb 2009 14:28:54 -0700, carnage wrot= e: > 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 th= ese > not so useful keys into useful keys. I have the same keyboard on a secondary system and would know the answert to your question, too. :-) As I knew from configuring my Sun USB Type 6 keyboard, xev is a good tool to check the keyboard output. It works for the Apple keys next to the space bar, but not for PF13 -- PR16, the volume keys and the eject key - xev doesn't show anything when they're pressed. Maybe you can use my ~/.xmodmaprc for the Sun keyboard, at least for educational purposes. :-) (I'll add the english key names; because I have the german version, I've initially named *them* within the comments.) ! ------------------------------------------------------------------------ ! $XFree86: xc/programs/Xserver/hw/xfree86/etc/xmodmap.std,v 3.5 1996/12/23= 06:47:28 dawes Exp $ ! $XConsortium: xmodmap.std /main/7 1996/02/21 17:48:55 kaleb $ !clear mod3 !clear mod4 add mod4 =3D Multi_key ! Hilfe / Help keycode 144 =3D F13 ! Stop / Stop keycode 145 =3D F14 ! Wiederholen / Again keycode 146 =3D F15 ! Eigenschaften / Props keycode 147 =3D F16 ! Zur=FCcknehmen / Undo keycode 148 =3D F17 ! Vordergrund / Front keycode 149 =3D F18 ! Kopieren / Copy keycode 150 =3D F19 ! =D6ffnen / Open keycode 151 =3D F20 ! Einsetzen / Insert keycode 152 =3D F21 ! Suchen / Find keycode 153 =3D F22 ! Ausschneiden / Cut keycode 154 =3D F23 ! Ton aus / Entmagnetisieren / Mute / Degauss keycode 141 =3D F24 ! Leiser / Mehr Kontrast / Lower volume / contrast keycode 142 =3D F25 ! Lauter / Weniger Kontrast / Raise volume / contrast keycode 143 =3D F26 ! Ausschalten (Mond) / Switch off (Moon) keycode 140 =3D F27 ! Meta links / Meta left keycode 115 =3D Meta_L ! Meta rechts / Meta right keycode 116 =3D Meta_R ! Compose keycode 117 =3D Multi_key ! ------------------------------------------------------------------------ It's easy to find out what the keys send using xev. Then, you can easily assign any key name to them that is present in the symbol file for xkb stuff. Note that this worked with XFree86 and X.org so far, but due to the newest "improvements", it may be possible that settings have to be done very differently now... (I've not taken the update yet.) If you got the keys working, please report back to the list. I'd be very interested in using them. They work fine when the keyboard is attached to an iBook. --=20 Polytropon >From Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...