Just wondering if it is possible to use a piezo sensor with a keyboard encoder, and if so, whether I would have to do anything special to make it work?
It won't work
directly with an "active low" (ground applied to input triggers the output) keyboard encoder.
- AFAIK a piezo sensor at rest with no load will generate no voltage which is the opposite of what you need.

The video on
this Sparkfun Piezo sensor page shows it controlling an LED connected to an Arduino.
- The LED output is triggered by knocking or tapping on the sensor.
The code for that
Knock sketch uses the "analogRead()" command so you'll need an Arduino with analog inputs like the Pro Micro.
There's info about how to adjust the sensitivity from 4:35-6:02 in this video.
You might be able to make the Knock sketch invert the LED state by changing line 33 from . . .
int ledState = LOW; // variable used to store the last LED status, to toggle the light
. . . to . . .
int ledState = HIGH; // variable used to store the last LED status, to toggle the light
That change
should make the LED stay on until you knock or press the sensor.
If that works, hook the Arduino LED output to your active low keyboard encoder input.
- LED on (logic high) = same as button not pressed.
- LED off (logic low) = same as button pressed.
There may be a better way, but this should get you started.

Scott