Adding ambient noise to selection

Hi,
I recorded a power point presentation using OBS. Each slide was recorded separately, meaning start and end of each recording gets the noise of the keystroke of the keyboard (start and stop). Then I import those recordings to Audacity, merge them and amplify.
The I need to remove that click noise of the keystrokes of the keyboard. Currently the only way to do that is insert silence in that interval, but, inserting silence in those parts kind of makes the recording unpleasant to hear, because you hear ambient sound and then silence for each recorded slide. I would like to copy ambient sound from that recording and paste some of it instead of the keystroke noise.

The problem is that when I select the part of the keystroke and paste the ambient noise, the pasted part is longer, so the recording gets longer, and therefore is not synchronized with the video.

My feature request is to be able to copy part of an audio (in my case 2 seconds of ambient noise) and paste it in a selected interval, so that the copied part would fit the interval as much as it can and any excess of it would be removed automatically.

There’s a pair of plug-ins designed for this task: https://forum.audacityteam.org/t/punch-copy-paste/28906/1

These are “Nyquist Plug-ins”. For installation instructions, follow the links on this page: https://manual.audacityteam.org/man/customization.html#plug-ins
(I would have linked to the exact part of the manual, but you’ve not said what operating system you are using).

Thanks, will look into it.
For the time being, I managed to do it this way:

• Import all recorded slide’s audio to one track.
• Merge manually (without removing the separating lines between recordings, so it is easy to locate the keystroke sounds)
• Add an empty track underneath.
• Copy your desired ambient sound (to replace the clicks).
• Mark a part of the click in the original track and press ALT+CTRL+k to remove that part and keeping the gap.
• On the empty track underneath mark the gap and paste the ambient sound. Delete any excess.

I tried it. It is a better solution than mine. Thank you for sharing this solution