Touchscreen flipped

I hate that this happens but when I turn my laptop screen around into tent mode, I have to manually rotate the display by 180 which I have setup keyboard shortcuts for but it should be autonmatic. Next, when I try to touch the screen the mouse is registered upside down. So if I was to try and touch the screen at the bottom of the display it registers at the top, so esentially flipped in the middle. The touchscreen does work when it is laptop mode but the main reason for doing is, so that I can watch netflix while in bed in tent mode. I was using the ubuntu gnome edition before and the touch screen worked like a charm. It even had an onscreen keyboard built in which would load up whenever I would go to a valid textbox but KDE does not have this. I have to use a third party onscreen keyboard called onboard which is good enough but not as good as the gnome one. P.S. Not intending on switch to the gnome de, for me it lacked customization