Welcome to AAC!
Please use proper full sentences when asking for help, and provide as much detail as possible (e.g. voltage/current/switching-speed etc) so that relevant responses can be given.
+5v TTL interface (tested only in LTSpice)
the TTL part may start oscillating with some capacitor values - so
it must be tuned for stability in real test
An XOR circuit can generate a pulse when the input goes high and when it goes low.
Is that what you want?
Below is the LTspice simulation of such a circuit using four Schmidt-trigger NAND gates (one package) to generate the XOR function, and includes switch debounce.