How to enable Spen with Gfxtablet Android App and Ubuntu

Hello, i am trying to use an android app name gfxtablet to use my android tablet note pro 12.2 as digitizer to draw under ubuntu linux.

I can successfully use spen and even pressure sensivity is enabled, but spen button not function.

Can anybody help me ?

Hello,
You can capture the button press event by configuring them as KeyEvent in xml file. For implementation details check out the following link:

Note that, you do not need to integrate S Pen Remote SDK for working with button press event. Only configuring a xml file is good enough.

thanks for reply. I still couldnt figure out how to do this.

i follow steps for adding xml and necessary command lines .

How to add s-pen button event ? when i use keycode. it does not shows anything related to button ( such as stylus button etc.

If you explain detailed, i really appreciate it.