Default [Q] Disable capacitive buttons when x app is active?

I am trying to figure out how to disable the capacitive buttons when a particular app is open. This is mainly for taking notes or writing in general. I realize that I can just flip the tablet, but it's still more beneficial to just kill the buttons. I am rooted and running cleanrom v2 with bindroid kernel. I also have xposed installed as well as Tasker and a bunch of other automation type apps installed. As of now I can disable them manually with xposed additions, but that takes too long haha.

I know that there has to be a way to do this. Anyone have any ideas?