Hi dear , I have gone through your question and i understand your concern
the medication you are taking(
levofloxacin) can cause abnormal heart rhythms when taken with Certain medications (e.g., sotalol, quinidine,
thioridazine,
chlorpromazine, droperidol, pimozide,
moxifloxacin, mefloquine, pentamidine, arsenic trioxide, dolasetron mesylate, probucol, tacrolimus) can increase the risk of a type of abnormal heart rhythm called QT prolongation, and should not be used in combination with levofloxacin.
Generally it is seen in less people though possible. As you have experienced
drug allergy ,it may be due to it.
But certainly as you fell your heart beats since you suffered with pneumona and you were later switched with levofloxacin so chances seems to be less that it is causing it.
What you are having is awareness of once own heart beat known as palpitations and since you find your heart beat as irregular it may be arrhythmic heart beat.
I will advice you to take your ECG done and clinical examination from cardiologist.
Hope you find the answer helpful, please do get back for further queries I will be happy to assist you.Please rate 5 stars for finding some benefits with this information it will ignite me to help more.
Wishing your good health.
Regards
Dr.Vigyan Mishra