Re: [PATCH] Macbook1,1 - minimal diff to swap 2 key for ISO internal kbd
Yes to all of that, the better names also. Mark Kettenis wrote: > > From: Mathias Schmocker > > Date: Wed, 28 Oct 2020 20:54:13 +0100 > > > > Hello, > > Here a minimal diff to solve the swapped keys of the internal ISO > > keyboard/trackpad found on my older Macbook1,1 13inch black laptop > > (6.8 i386 release) > > cvs diff: Diffing . > > Index: ukbd.c > > === > > RCS file: /home/cvs/src/sys/dev/usb/ukbd.c,v > > retrieving revision 1.79 > > diff -u -p -r1.79 ukbd.c > > --- ukbd.c 23 Aug 2020 11:08:02 - 1.79 > > +++ ukbd.c 27 Oct 2020 19:18:51 - > > @@ -259,6 +259,7 @@ ukbd_attach(struct device *parent, struc > > case USB_PRODUCT_APPLE_GEYSER_ISO: > > case USB_PRODUCT_APPLE_WELLSPRING6_ISO: > > case USB_PRODUCT_APPLE_WELLSPRING8_ISO: > > + case USB_PRODUCT_APPLE_INT_KBTP_218_ISO: > > sc->sc_munge = ukbd_apple_iso_munge; > > break; > > case USB_PRODUCT_APPLE_WELLSPRING_ISO: > > Index: usbdevs > > === > > RCS file: /home/cvs/src/sys/dev/usb/usbdevs,v > > retrieving revision 1.720 > > diff -u -p -r1.720 usbdevs > > --- usbdevs 3 Aug 2020 14:25:44 - 1.720 > > +++ usbdevs 27 Oct 2020 19:24:15 - > > @@ -941,6 +941,7 @@ product APPLE FOUNTAIN_ANSI 0x020e Keybo > > product APPLE FOUNTAIN_ISO0x020f Keyboard/Trackpad > > product APPLE GEYSER_ANSI 0x0214 Keyboard/Trackpad > > product APPLE GEYSER_ISO 0x0215 Keyboard/Trackpad > > +product APPLE INT_KBTP_218_ISO 0x0218 Keyboard/Trackpad > > product APPLE WELLSPRING_ANSI 0x0223 Keyboard/Trackpad > > product APPLE WELLSPRING_ISO 0x0224 Keyboard/Trackpad > > product APPLE WELLSPRING_JIS 0x0225 Keyboard/Trackpad > > > > With this, the sf keyboard maps correcly the less/greater and the > > (swiss-french and swiss-german) section/degree key. > > On the console and on with the X-server. > > > > NetBSD has a better name for the device I think. So I propose the > diff below which also adds a few more missing device IDs in the range. > > ok? > > > Index: dev/usb/usbdevs > === > RCS file: /cvs/src/sys/dev/usb/usbdevs,v > retrieving revision 1.724 > diff -u -p -r1.724 usbdevs > --- dev/usb/usbdevs 25 Oct 2020 09:03:01 - 1.724 > +++ dev/usb/usbdevs 28 Oct 2020 20:29:58 - > @@ -951,6 +951,13 @@ product APPLE FOUNTAIN_ANSI 0x020e Keybo > product APPLE FOUNTAIN_ISO 0x020f Keyboard/Trackpad > product APPLE GEYSER_ANSI0x0214 Keyboard/Trackpad > product APPLE GEYSER_ISO 0x0215 Keyboard/Trackpad > +product APPLE GEYSER_JIS 0x0216 Keyboard/Trackpad > +product APPLE GEYSER3_ANSI 0x0217 Keyboard/Trackpad > +product APPLE GEYSER3_ISO0x0218 Keyboard/Trackpad > +product APPLE GEYSER3_JIS0x0219 Keyboard/Trackpad > +product APPLE GEYSER4_ANSI 0x021a Keyboard/Trackpad > +product APPLE GEYSER4_ISO0x021b Keyboard/Trackpad > +product APPLE GEYSER4_JIS0x021c Keyboard/Trackpad > product APPLE WELLSPRING_ANSI0x0223 Keyboard/Trackpad > product APPLE WELLSPRING_ISO 0x0224 Keyboard/Trackpad > product APPLE WELLSPRING_JIS 0x0225 Keyboard/Trackpad > Index: dev/usb/ukbd.c > === > RCS file: /cvs/src/sys/dev/usb/ukbd.c,v > retrieving revision 1.79 > diff -u -p -r1.79 ukbd.c > --- dev/usb/ukbd.c23 Aug 2020 11:08:02 - 1.79 > +++ dev/usb/ukbd.c28 Oct 2020 20:29:58 - > @@ -257,6 +257,7 @@ ukbd_attach(struct device *parent, struc > switch (uha->uaa->product) { > case USB_PRODUCT_APPLE_FOUNTAIN_ISO: > case USB_PRODUCT_APPLE_GEYSER_ISO: > + case USB_PRODUCT_APPLE_GEYSER3_ISO: > case USB_PRODUCT_APPLE_WELLSPRING6_ISO: > case USB_PRODUCT_APPLE_WELLSPRING8_ISO: > sc->sc_munge = ukbd_apple_iso_munge; >
Re: [PATCH] Macbook1,1 - minimal diff to swap 2 key for ISO internal kbd
> From: Mathias Schmocker > Date: Wed, 28 Oct 2020 20:54:13 +0100 > > Hello, > Here a minimal diff to solve the swapped keys of the internal ISO > keyboard/trackpad found on my older Macbook1,1 13inch black laptop > (6.8 i386 release) > cvs diff: Diffing . > Index: ukbd.c > === > RCS file: /home/cvs/src/sys/dev/usb/ukbd.c,v > retrieving revision 1.79 > diff -u -p -r1.79 ukbd.c > --- ukbd.c23 Aug 2020 11:08:02 - 1.79 > +++ ukbd.c27 Oct 2020 19:18:51 - > @@ -259,6 +259,7 @@ ukbd_attach(struct device *parent, struc > case USB_PRODUCT_APPLE_GEYSER_ISO: > case USB_PRODUCT_APPLE_WELLSPRING6_ISO: > case USB_PRODUCT_APPLE_WELLSPRING8_ISO: > + case USB_PRODUCT_APPLE_INT_KBTP_218_ISO: > sc->sc_munge = ukbd_apple_iso_munge; > break; > case USB_PRODUCT_APPLE_WELLSPRING_ISO: > Index: usbdevs > === > RCS file: /home/cvs/src/sys/dev/usb/usbdevs,v > retrieving revision 1.720 > diff -u -p -r1.720 usbdevs > --- usbdevs 3 Aug 2020 14:25:44 - 1.720 > +++ usbdevs 27 Oct 2020 19:24:15 - > @@ -941,6 +941,7 @@ product APPLE FOUNTAIN_ANSI 0x020e Keybo > product APPLE FOUNTAIN_ISO 0x020f Keyboard/Trackpad > product APPLE GEYSER_ANSI 0x0214 Keyboard/Trackpad > product APPLE GEYSER_ISO0x0215 Keyboard/Trackpad > +product APPLE INT_KBTP_218_ISO 0x0218 Keyboard/Trackpad > product APPLE WELLSPRING_ANSI 0x0223 Keyboard/Trackpad > product APPLE WELLSPRING_ISO0x0224 Keyboard/Trackpad > product APPLE WELLSPRING_JIS0x0225 Keyboard/Trackpad > > With this, the sf keyboard maps correcly the less/greater and the > (swiss-french and swiss-german) section/degree key. > On the console and on with the X-server. > NetBSD has a better name for the device I think. So I propose the diff below which also adds a few more missing device IDs in the range. ok? Index: dev/usb/usbdevs === RCS file: /cvs/src/sys/dev/usb/usbdevs,v retrieving revision 1.724 diff -u -p -r1.724 usbdevs --- dev/usb/usbdevs 25 Oct 2020 09:03:01 - 1.724 +++ dev/usb/usbdevs 28 Oct 2020 20:29:58 - @@ -951,6 +951,13 @@ product APPLE FOUNTAIN_ANSI0x020e Keybo product APPLE FOUNTAIN_ISO 0x020f Keyboard/Trackpad product APPLE GEYSER_ANSI 0x0214 Keyboard/Trackpad product APPLE GEYSER_ISO 0x0215 Keyboard/Trackpad +product APPLE GEYSER_JIS 0x0216 Keyboard/Trackpad +product APPLE GEYSER3_ANSI 0x0217 Keyboard/Trackpad +product APPLE GEYSER3_ISO 0x0218 Keyboard/Trackpad +product APPLE GEYSER3_JIS 0x0219 Keyboard/Trackpad +product APPLE GEYSER4_ANSI 0x021a Keyboard/Trackpad +product APPLE GEYSER4_ISO 0x021b Keyboard/Trackpad +product APPLE GEYSER4_JIS 0x021c Keyboard/Trackpad product APPLE WELLSPRING_ANSI 0x0223 Keyboard/Trackpad product APPLE WELLSPRING_ISO 0x0224 Keyboard/Trackpad product APPLE WELLSPRING_JIS 0x0225 Keyboard/Trackpad Index: dev/usb/ukbd.c === RCS file: /cvs/src/sys/dev/usb/ukbd.c,v retrieving revision 1.79 diff -u -p -r1.79 ukbd.c --- dev/usb/ukbd.c 23 Aug 2020 11:08:02 - 1.79 +++ dev/usb/ukbd.c 28 Oct 2020 20:29:58 - @@ -257,6 +257,7 @@ ukbd_attach(struct device *parent, struc switch (uha->uaa->product) { case USB_PRODUCT_APPLE_FOUNTAIN_ISO: case USB_PRODUCT_APPLE_GEYSER_ISO: + case USB_PRODUCT_APPLE_GEYSER3_ISO: case USB_PRODUCT_APPLE_WELLSPRING6_ISO: case USB_PRODUCT_APPLE_WELLSPRING8_ISO: sc->sc_munge = ukbd_apple_iso_munge;
Re: [PATCH] Macbook1,1 - minimal diff to swap 2 key for ISO internal kbd
On Wed, Oct 28, 2020 at 08:54:13PM +0100, Mathias Schmocker wrote: > Hello, > Here a minimal diff to solve the swapped keys of the internal ISO > keyboard/trackpad found on my older Macbook1,1 13inch black laptop Looks ok. One nit: I would propose changing the name of the device. It seems the commonly used name for this keyboard is GEYSER3_ISO. I will commit the attached diff but change the name to APPLE_GEYSER3_ISO unless anyone has objections. > (6.8 i386 release) > cvs diff: Diffing . > Index: ukbd.c > === > RCS file: /home/cvs/src/sys/dev/usb/ukbd.c,v > retrieving revision 1.79 > diff -u -p -r1.79 ukbd.c > --- ukbd.c23 Aug 2020 11:08:02 - 1.79 > +++ ukbd.c27 Oct 2020 19:18:51 - > @@ -259,6 +259,7 @@ ukbd_attach(struct device *parent, struc > case USB_PRODUCT_APPLE_GEYSER_ISO: > case USB_PRODUCT_APPLE_WELLSPRING6_ISO: > case USB_PRODUCT_APPLE_WELLSPRING8_ISO: > + case USB_PRODUCT_APPLE_INT_KBTP_218_ISO: > sc->sc_munge = ukbd_apple_iso_munge; > break; > case USB_PRODUCT_APPLE_WELLSPRING_ISO: > Index: usbdevs > === > RCS file: /home/cvs/src/sys/dev/usb/usbdevs,v > retrieving revision 1.720 > diff -u -p -r1.720 usbdevs > --- usbdevs 3 Aug 2020 14:25:44 - 1.720 > +++ usbdevs 27 Oct 2020 19:24:15 - > @@ -941,6 +941,7 @@ product APPLE FOUNTAIN_ANSI 0x020e Keybo > product APPLE FOUNTAIN_ISO 0x020f Keyboard/Trackpad > product APPLE GEYSER_ANSI0x0214 Keyboard/Trackpad > product APPLE GEYSER_ISO 0x0215 Keyboard/Trackpad > +product APPLE INT_KBTP_218_ISO 0x0218 Keyboard/Trackpad > product APPLE WELLSPRING_ANSI0x0223 Keyboard/Trackpad > product APPLE WELLSPRING_ISO 0x0224 Keyboard/Trackpad > product APPLE WELLSPRING_JIS 0x0225 Keyboard/Trackpad > > With this, the sf keyboard maps correcly the less/greater and the > (swiss-french and swiss-german) section/degree key. > On the console and on with the X-server. > > I was annoyed by using an external Dell USB keyboard... > (not affected by this diff, dmesg below) > > OpenBSD 6.8 (GENERIC.MP) #27: Tue Oct 27 20:56:51 CET 2020 > s...@i386.smat.ch:/sys/arch/i386/compile/GENERIC.MP > real mem = 2114273280 (2016MB) > avail mem = 2059362304 (1963MB) > random: good seed from bootblocks > mpath0 at root > scsibus0 at mpath0: 256 targets > mainbus0 at root > bios0 at mainbus0: date 07/29/05, SMBIOS rev. 2.4 @ 0xe7440 (37 entries) > bios0: vendor Apple Computer, Inc. version "MB11.88Z.0061.B03.0610121324" > date 10/12/06 > bios0: Apple Computer, Inc. MacBook1,1 > acpi0 at bios0: ACPI 3.0 > acpi0: sleep states S0 S3 S4 S5 > acpi0: tables DSDT FACP HPET APIC MCFG ASF! SBST ECDT SSDT SSDT SSDT > acpi0: wakeup devices ADP1(S3) LID0(S3) PXS1(S4) PXS2(S4) USB1(S3) USB2(S3) > USB3(S3) USB4(S3) USB7(S3) EC__(S3) > acpitimer0 at acpi0: 3579545 Hz, 24 bits > acpihpet0 at acpi0: 14318179 Hz > acpimadt0 at acpi0 addr 0xfee0: PC-AT compat > cpu0 at mainbus0: apid 0 (boot processor) > cpu0: Genuine Intel(R) CPU 1500 @ 2.00GHz ("GenuineIntel" 686-class) 2 GHz, > 06-0e-08 > cpu0: > FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,MWAIT,VMX,EST,TM2,xTPR,PDCM,NXE,PERF,SENSOR,MELTDOWN > mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges > cpu0: apic clock running at 166MHz > cpu0: mwait min=64, max=64, C-substates=0.2.2.2.2, IBE > cpu1 at mainbus0: apid 1 (application processor) > cpu1: Genuine Intel(R) CPU 1500 @ 2.00GHz ("GenuineIntel" 686-class) 2 GHz, > 06-0e-08 > cpu1: > FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,MWAIT,VMX,EST,TM2,xTPR,PDCM,NXE,PERF,SENSOR,MELTDOWN > ioapic0 at mainbus0: apid 1 pa 0xfec0, version 20, 24 pins, remapped > acpimcfg0 at acpi0 > acpimcfg0: addr 0xe000, bus 0-255 > acpiec0 at acpi0 > acpiprt0 at acpi0: bus 0 (PCI0) > acpiprt1 at acpi0: bus 1 (RP01) > acpiprt2 at acpi0: bus 2 (RP02) > acpiprt3 at acpi0: bus 3 (PCIB) > acpisbs0 at acpi0: SBS0 model "ASMB013" serial 1234 type LION oem "HSW" > acpiac0 at acpi0: AC unit online > acpibtn0 at acpi0: LID0 > "APP0002" at acpi0 not configured > acpibtn1 at acpi0: PWRB > acpibtn2 at acpi0: SLPB > "PNP0A08" at acpi0 not configured > asmc0 at acpi0: SMC_ (smc-napa) addr 0x300/0x20: rev 1.4f504, 203 keys > "APP0003" at acpi0 not configured > "ACPI0001" at acpi0 not configured > "IFX0101" at acpi0 not configured > acpicmos0 at acpi0 > acpicpu0 at acpi0: !C4(100@55 mwait@0x31), !C3(500@1 mwait@0x20), !C2(500@1 > mwait@0x10), C1(1000@1 mwait), PSS > acpicpu1 at acpi0: !C4(100@55 mwait@0x31), !C3(500@1 mwait@0x20), !C2(500@1 > mwait@0x1
[PATCH] Macbook1,1 - minimal diff to swap 2 key for ISO internal kbd
Hello, Here a minimal diff to solve the swapped keys of the internal ISO keyboard/trackpad found on my older Macbook1,1 13inch black laptop (6.8 i386 release) cvs diff: Diffing . Index: ukbd.c === RCS file: /home/cvs/src/sys/dev/usb/ukbd.c,v retrieving revision 1.79 diff -u -p -r1.79 ukbd.c --- ukbd.c 23 Aug 2020 11:08:02 - 1.79 +++ ukbd.c 27 Oct 2020 19:18:51 - @@ -259,6 +259,7 @@ ukbd_attach(struct device *parent, struc case USB_PRODUCT_APPLE_GEYSER_ISO: case USB_PRODUCT_APPLE_WELLSPRING6_ISO: case USB_PRODUCT_APPLE_WELLSPRING8_ISO: + case USB_PRODUCT_APPLE_INT_KBTP_218_ISO: sc->sc_munge = ukbd_apple_iso_munge; break; case USB_PRODUCT_APPLE_WELLSPRING_ISO: Index: usbdevs === RCS file: /home/cvs/src/sys/dev/usb/usbdevs,v retrieving revision 1.720 diff -u -p -r1.720 usbdevs --- usbdevs 3 Aug 2020 14:25:44 - 1.720 +++ usbdevs 27 Oct 2020 19:24:15 - @@ -941,6 +941,7 @@ product APPLE FOUNTAIN_ANSI 0x020e Keybo product APPLE FOUNTAIN_ISO 0x020f Keyboard/Trackpad product APPLE GEYSER_ANSI 0x0214 Keyboard/Trackpad product APPLE GEYSER_ISO 0x0215 Keyboard/Trackpad +product APPLE INT_KBTP_218_ISO 0x0218 Keyboard/Trackpad product APPLE WELLSPRING_ANSI 0x0223 Keyboard/Trackpad product APPLE WELLSPRING_ISO 0x0224 Keyboard/Trackpad product APPLE WELLSPRING_JIS 0x0225 Keyboard/Trackpad With this, the sf keyboard maps correcly the less/greater and the (swiss-french and swiss-german) section/degree key. On the console and on with the X-server. I was annoyed by using an external Dell USB keyboard... (not affected by this diff, dmesg below) OpenBSD 6.8 (GENERIC.MP) #27: Tue Oct 27 20:56:51 CET 2020 s...@i386.smat.ch:/sys/arch/i386/compile/GENERIC.MP real mem = 2114273280 (2016MB) avail mem = 2059362304 (1963MB) random: good seed from bootblocks mpath0 at root scsibus0 at mpath0: 256 targets mainbus0 at root bios0 at mainbus0: date 07/29/05, SMBIOS rev. 2.4 @ 0xe7440 (37 entries) bios0: vendor Apple Computer, Inc. version "MB11.88Z.0061.B03.0610121324" date 10/12/06 bios0: Apple Computer, Inc. MacBook1,1 acpi0 at bios0: ACPI 3.0 acpi0: sleep states S0 S3 S4 S5 acpi0: tables DSDT FACP HPET APIC MCFG ASF! SBST ECDT SSDT SSDT SSDT acpi0: wakeup devices ADP1(S3) LID0(S3) PXS1(S4) PXS2(S4) USB1(S3) USB2(S3) USB3(S3) USB4(S3) USB7(S3) EC__(S3) acpitimer0 at acpi0: 3579545 Hz, 24 bits acpihpet0 at acpi0: 14318179 Hz acpimadt0 at acpi0 addr 0xfee0: PC-AT compat cpu0 at mainbus0: apid 0 (boot processor) cpu0: Genuine Intel(R) CPU 1500 @ 2.00GHz ("GenuineIntel" 686-class) 2 GHz, 06-0e-08 cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,MWAIT,VMX,EST,TM2,xTPR,PDCM,NXE,PERF,SENSOR,MELTDOWN mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges cpu0: apic clock running at 166MHz cpu0: mwait min=64, max=64, C-substates=0.2.2.2.2, IBE cpu1 at mainbus0: apid 1 (application processor) cpu1: Genuine Intel(R) CPU 1500 @ 2.00GHz ("GenuineIntel" 686-class) 2 GHz, 06-0e-08 cpu1: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,MWAIT,VMX,EST,TM2,xTPR,PDCM,NXE,PERF,SENSOR,MELTDOWN ioapic0 at mainbus0: apid 1 pa 0xfec0, version 20, 24 pins, remapped acpimcfg0 at acpi0 acpimcfg0: addr 0xe000, bus 0-255 acpiec0 at acpi0 acpiprt0 at acpi0: bus 0 (PCI0) acpiprt1 at acpi0: bus 1 (RP01) acpiprt2 at acpi0: bus 2 (RP02) acpiprt3 at acpi0: bus 3 (PCIB) acpisbs0 at acpi0: SBS0 model "ASMB013" serial 1234 type LION oem "HSW" acpiac0 at acpi0: AC unit online acpibtn0 at acpi0: LID0 "APP0002" at acpi0 not configured acpibtn1 at acpi0: PWRB acpibtn2 at acpi0: SLPB "PNP0A08" at acpi0 not configured asmc0 at acpi0: SMC_ (smc-napa) addr 0x300/0x20: rev 1.4f504, 203 keys "APP0003" at acpi0 not configured "ACPI0001" at acpi0 not configured "IFX0101" at acpi0 not configured acpicmos0 at acpi0 acpicpu0 at acpi0: !C4(100@55 mwait@0x31), !C3(500@1 mwait@0x20), !C2(500@1 mwait@0x10), C1(1000@1 mwait), PSS acpicpu1 at acpi0: !C4(100@55 mwait@0x31), !C3(500@1 mwait@0x20), !C2(500@1 mwait@0x10), C1(1000@1 mwait), PSS acpivideo0 at acpi0: GFX0 bios0: ROM list: 0xc/0xe600! cpu0: Enhanced SpeedStep 1998 MHz: speeds: 2000, 1833, 1667, 1500, 1333, 1000 MHz memory map conflict 0xe00f8000/0x1000 memory map conflict 0xfed1c000/0x4000 memory map conflict 0xfffb/0x3 pci0 at mainbus0 bus 0: configuration mode 1 (bios) pchb0 at pci0 dev 0 function 0 "Intel 82945GM Host" rev 0x03 inteldrm0 at pci0 dev 2 function 0 "Intel 82945GM Video" rev 0x03 drm0 at inteldr