Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Feb 2009 00:22:18 +0100
From:      Polytropon <freebsd@edvax.de>
To:        carnage <carnagewashere@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Determining scancodes for obscure keyboard to modify keymap
Message-ID:  <20090225002218.a25136a0.freebsd@edvax.de>
In-Reply-To: <93e00050902241328x6867e315vd7c3b63c46d685c0@mail.gmail.com>
References:  <93e00050902241328x6867e315vd7c3b63c46d685c0@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 24 Feb 2009 14:28:54 -0700, carnage <carnagewashere@gmail.com> 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, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090225002218.a25136a0.freebsd>