[ubuntu] tablet pen right click/erase possible w/ ubuntu?

view story

http://ubuntuforums.org – Recently got an hp tc4400 for free, one of the things that i am curious about is if it is possible to do right clicks with the pen button and erase or middle click with the second button Im not to sure about the tech involved for these particular buttons to register as presses or how to even tie that to a right click or similar command to mouse controls the pen has no wires but there also dosnt seem to be a place to put batteries is it sort of triggered rfid or something that the tablet can recognize? does any one have any insights on this? (Hardware)