Contribute
Register

Remapping keyboard with VoodooPS2

Status
Not open for further replies.
Those keys are NX keys... from VoodooPS2Keyboard.cpp:
Code:
        NX_KEYTYPE_PLAY,        0x34,
        NX_KEYTYPE_NEXT,        0x42,       // if this event repeated, act as NX_KEYTYPE_FAST
        NX_KEYTYPE_PREVIOUS,    0x4d,        // if this event repeated, act as NX_KEYTYPE_REWIND



It is work you need to do, not me. You can find out how to capture ACPI events in the brightness guide.
Thank you for the codes :)

I tested the keys and got an output for each combination:
Fn only:
default 20:50:24.892997 +0200 kernel ACPIDebug: "EC _QD3 enter"
default 20:50:24.893219 +0200 kernel ACPIDebug: "EC _QD3 exit"
default 20:50:25.018264 +0200 kernel ACPIDebug: "EC _QD4 enter"
default 20:50:25.018488 +0200 kernel ACPIDebug: "EC _QD4 exit"

Fn+Down Arrow (should be play/pause):
default 20:51:38.608152 +0200 kernel ACPIDebug: "EC _QD3 enter"
default 20:51:38.608385 +0200 kernel ACPIDebug: "EC _QD3 exit"
default 20:51:38.839506 +0200 kernel ACPIDebug: "EC _Q6F enter"
default 20:51:38.839738 +0200 kernel ACPIDebug: "EC _Q6F exit"
default 20:51:38.909295 +0200 kernel ACPIDebug: "EC _QD4 enter"
default 20:51:38.909474 +0200 kernel ACPIDebug: "EC _QD4 exit"

Fn+Right Arrow (should be next):
default 20:52:40.293189 +0200 kernel ACPIDebug: "EC _QD3 enter"
default 20:52:40.293427 +0200 kernel ACPIDebug: "EC _QD3 exit"
default 20:52:40.567926 +0200 kernel ACPIDebug: "EC _Q6D enter"
default 20:52:40.568063 +0200 kernel ACPIDebug: "EC _Q6D exit"
default 20:52:40.898467 +0200 kernel ACPIDebug: "EC _QD4 enter"
default 20:52:40.898713 +0200 kernel ACPIDebug: "EC _QD4 exit"

Fn+Left Arrow (should be previous):
default 20:53:28.092488 +0200 kernel ACPIDebug: "EC _QD3 enter"
default 20:53:28.092726 +0200 kernel ACPIDebug: "EC _QD3 exit"
default 20:53:28.356237 +0200 kernel ACPIDebug: "EC _Q6C enter"
default 20:53:28.356434 +0200 kernel ACPIDebug: "EC _Q6C exit"
default 20:53:28.612699 +0200 kernel ACPIDebug: "EC _QD4 enter"
default 20:53:28.612892 +0200 kernel ACPIDebug: "EC _QD4 exit"

If I understood correctly, should I use these patches?
Code:
into method label _Q6F replace_content
begin
// Play Pause\n
    Notify(\_SB.PCI0.LPCB.PS2K, 0x0034) //PlayPauseKey\n
end;
into method label _Q6D replace_content
begin
// Next\n
    Notify(\_SB.PCI0.LPCB.PS2K, 0x0042) //NextKey\n
end;
into method label _Q6C replace_content
begin
// Previous\n
    Notify(\_SB.PCI0.LPCB.PS2K, 0x004d) //PreviousKey\n
end;

Additionally, I see that my Fn key sends a code alone. Can I make it work on macOS?
What about the ACPIDebug kext+Patches? should I keep them installed/applied?

Thank you!
 
Thank you for the codes :)

I tested the keys and got an output for each combination:
Fn only:
default 20:50:24.892997 +0200 kernel ACPIDebug: "EC _QD3 enter"
default 20:50:24.893219 +0200 kernel ACPIDebug: "EC _QD3 exit"
default 20:50:25.018264 +0200 kernel ACPIDebug: "EC _QD4 enter"
default 20:50:25.018488 +0200 kernel ACPIDebug: "EC _QD4 exit"

Fn+Down Arrow (should be play/pause):
default 20:51:38.608152 +0200 kernel ACPIDebug: "EC _QD3 enter"
default 20:51:38.608385 +0200 kernel ACPIDebug: "EC _QD3 exit"
default 20:51:38.839506 +0200 kernel ACPIDebug: "EC _Q6F enter"
default 20:51:38.839738 +0200 kernel ACPIDebug: "EC _Q6F exit"
default 20:51:38.909295 +0200 kernel ACPIDebug: "EC _QD4 enter"
default 20:51:38.909474 +0200 kernel ACPIDebug: "EC _QD4 exit"

Fn+Right Arrow (should be next):
default 20:52:40.293189 +0200 kernel ACPIDebug: "EC _QD3 enter"
default 20:52:40.293427 +0200 kernel ACPIDebug: "EC _QD3 exit"
default 20:52:40.567926 +0200 kernel ACPIDebug: "EC _Q6D enter"
default 20:52:40.568063 +0200 kernel ACPIDebug: "EC _Q6D exit"
default 20:52:40.898467 +0200 kernel ACPIDebug: "EC _QD4 enter"
default 20:52:40.898713 +0200 kernel ACPIDebug: "EC _QD4 exit"

Fn+Left Arrow (should be previous):
default 20:53:28.092488 +0200 kernel ACPIDebug: "EC _QD3 enter"
default 20:53:28.092726 +0200 kernel ACPIDebug: "EC _QD3 exit"
default 20:53:28.356237 +0200 kernel ACPIDebug: "EC _Q6C enter"
default 20:53:28.356434 +0200 kernel ACPIDebug: "EC _Q6C exit"
default 20:53:28.612699 +0200 kernel ACPIDebug: "EC _QD4 enter"
default 20:53:28.612892 +0200 kernel ACPIDebug: "EC _QD4 exit"

If I understood correctly, should I use these patches?
Code:
into method label _Q6F replace_content
begin
// Play Pause\n
    Notify(\_SB.PCI0.LPCB.PS2K, 0x0034) //PlayPauseKey\n
end;
into method label _Q6D replace_content
begin
// Next\n
    Notify(\_SB.PCI0.LPCB.PS2K, 0x0042) //NextKey\n
end;
into method label _Q6C replace_content
begin
// Previous\n
    Notify(\_SB.PCI0.LPCB.PS2K, 0x004d) //PreviousKey\n
end;

Notify does not use ADB codes. It accepts "modified" PS2 codes.

And I don't know what Fn+arrows have to do with your media controls.
 
Notify does not use ADB codes. It accepts "modified" PS2 codes.
So how can I use ADB? If I can...
What should the modified PS2 codes be? :p

As you saw, my Fn key sends a 'signal' even if I only press it without another key. How can I make it work on macOS too? (Edited the last comment too late :p )
 
So how can I use ADB? If I can...
What should the modified PS2 codes be? :p

It is not possible to send ADB codes directly via Notify. Must send PS2 codes that are mapped to ADB.

See brightness guide: https://www.tonymacx86.com/threads/guide-patching-dsdt-ssdt-for-laptop-backlight-control.152659/

As you saw, my Fn key sends a 'signal' even if I only press it without another key. How can I make it work on macOS too? (Edited the last comment too late :p )

You would need to determine how to detect that in ACPI and send a PS2 code that can map to Fn ADB.
 
It is not possible to send ADB codes directly via Notify. Must send PS2 codes that are mapped to ADB.

See brightness guide: https://www.tonymacx86.com/threads/guide-patching-dsdt-ssdt-for-laptop-backlight-control.152659/



You would need to determine how to detect that in ACPI and send a PS2 code that can map to Fn ADB.
I found this inside VoodooPS2's keyboard info.plist:
Code:
<string>46=4d;scroll =&gt; Previous-track</string>
                            <string>e045=34;pause =&gt; Play-Pause</string>
                            <string>e052=42;insert =&gt; Next-track</string>
What I can understand from here?
If it's nothing (guess it really can't help me), In which way I can find them?

Thanks!
 
I found this inside VoodooPS2's keyboard info.plist:
Code:
<string>46=4d;scroll =&gt; Previous-track</string>
                            <string>e045=34;pause =&gt; Play-Pause</string>
                            <string>e052=42;insert =&gt; Next-track</string>
What I can understand from here?
If it's nothing (guess it really can't help me), In which way I can find them?

Thanks!

Those are "Custom PS2" mappings for a specific laptop. They map the PS2 codes on the left of the '=' to the ADB codes on the right of the '='.

The same can be done via ACPI/RMCF.
 
Those are "Custom PS2" mappings for a specific laptop. They map the PS2 codes on the left of the '=' to the ADB codes on the right of the '='.

The same can be done via ACPI/RMCF.
But how it's done?
Sorry for asking too much questions, but I really don't understand. :(
Thanks again.
 
But how it's done?
Sorry for asking too much questions, but I really don't understand. :(
Thanks again.

You will need to be much more specific about what you're trying to accomplish.
 
You will need to be much more specific about what you're trying to accomplish.
Getting the PS2 code for Play/Pause+Next+Previous.
The codes I should put inside my DSDT Patch.
 
Status
Not open for further replies.
Back
Top