Hello,
It's unlikely there will be any way that you can do this with the keyboard, although as you don't say what keyboard it it, I cannot be certain.
There is more likely to be something you can do with the DAW (or whichever piece of software you're using to 'record' the notes you're playing, and you might look into this. Again, you don't say what the software is, so I cannot immed advise further, but the various systems you might be using will have differences in just what they allow.
If the software does not normally allow exactly what you want, you may be able to create a separate bar with the notes you want, prob using step input, and then paste that in manually. Otherwise, there may be pieces of software that would allow you to edit a saved midi file and add bars in, to replace existing bars with maybe one 'dummy' note in. I could certainly do this using programming (coding) or text editing (converting a midi file to editable text, modifing the file, and then converting back to midi) but these methods might not be suitable for you depending on your OS.
Geoff