Hello,

I'm trying to use two Intuos 5 tablets (simultaneous input from each) to move two cursors at once in pygame.

I thought that I would be able to do this by initializing two separate contexts and using the context.movemask to specify which cursors could create move events for each.

I haven't been able to get movemask to work in the way I thought it would. Specifically, the first tablet's stylus is identified as cursor 2 using the info commands, and the second tablet's cursor is 7.

I'm not exactly clear on how to use the cursor mask command, but when I set it to movemask = 2, it doesn't have any effect.

I am, however, able to specify which device can create movement events in the context.

It occurs to me that the way I'm trying to do this is entirely incorrect, but either way I could use some help.

Below is the code for each context.

class Tablet1(object):
    def __init__(self, screen, hwnd=None):
        self.hwnd = pygame.display.get_wm_info()["window"]
        self.context = wintab.Context()
        self.context.pktdata = (PK_X | PK_Y | PK_CURSOR)
        self.context.movemask = 2
        self.context.device = 0
        self.context.open(self.hwnd, True)

class Tablet2(object):
    def __init__(self, screen, hwnd=None):
        self.hwnd = pygame.display.get_wm_info()["window"]
        self.context = wintab.Context()
        self.context.pktdata = (PK_X | PK_Y | PK_CURSOR)
        self.context.device = 1
        self.context.movemask = 7
        self.context.open(self.hwnd, True)

Thanks,

Ryan