Instead, you could have a "show" key that you would press in combination with another key to show the latter key on the screen.
Such a feature would be particularly useful for non-standard keys such as media playback controls.
xev
I pressed and released the F12 key on my keyboard: KeyPress event, serial 37, synthetic NO, window 0x4600001,
root 0x25e, subw 0x0, time 32145541, (2160,238), root:(2611,1142),
state 0x10, keycode 96 (keysym 0xffc9, F12), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 37, synthetic NO, window 0x4600001,
root 0x25e, subw 0x0, time 32145717, (2160,238), root:(2611,1142),
state 0x10, keycode 96 (keysym 0xffc9, F12), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False