Interesting...
cosine is using little reed relays to switch the contact to ground.
It's not a bad approach, but then you have the capacitance of the lead wire.
I did a similar thing using forward/reverse pair of diodes directly at the contact point.
I used adhesive copper tape that I punched with a notebook hole puncher.
There are some use cases for this stick-on automation, but I'd prefer not to encumber the screeen.
Nowadays, a Bluetooth clicker is the solution.
You could make a WiFi daemon to listen and inject keys.
You could also make a USB HID peripheral to send PgUp/PgDn.
(You can even just gut a USB keyboard that's in the trash and put two buttons on it.)
You can put in a connector for serial console and connect a little command injector.
You could parallel the hard keys in the device.
Outside of that, I can't think how you could do it.