+
+ def OnChangeModifiers(self, event):
+ choices = [wx.WXK_CONTROL, wx.WXK_SHIFT, wx.WXK_ALT]
+ schoices = ['Control', 'Shift', 'Alt']
+
+ d = wx.lib.dialogs.MultipleChoiceDialog(self, 'Select Modifier Keys:\n(Select None if you do not want to use modifier keys\n\n', "Change Modifier Keys", schoices)
+ answer = d.ShowModal()
+ tuply = d.GetValue()
+ d.Destroy()
+
+ if (answer == wx.ID_OK):
+ if len(tuply) > 0:
+ modifiers = []
+ modstring = ''
+ for x in tuply:
+ modifiers.append(choices[x])
+ modstring += schoices[x] + ' '
+ self.mg.SetModifiers(modifiers)
+ self.log.WriteText('Set Modifiers to: ' + modstring)
+ else:
+ self.mg.SetModifiers()
+ self.log.WriteText('UnSet All Modifiers')
+
+ def OnChangeMouseButton(self, event):
+ choices = [wx.MOUSE_BTN_LEFT, wx.MOUSE_BTN_MIDDLE, wx.MOUSE_BTN_RIGHT]
+ schoices = ['Left', 'Middle', 'Right']
+ d = wx.SingleChoiceDialog(self, "Set Mouse Button To", "Change Mouse Button", schoices,
+ wx.CHOICEDLG_STYLE|wx.OK|wx.CANCEL)
+ d.SetSize(wx.Size(250, 200))
+ answer = d.ShowModal()
+ i = d.GetSelection()
+ d.Destroy()
+ if (answer == wx.ID_OK):
+ self.mg.SetMouseButton(choices[i])
+ self.log.WriteText('Set the Mouse Button to ' + schoices[i])