Archived
1
0

Add USB Code support for combination and sequence triggers

This commit is contained in:
Steve McMaster 2015-02-27 23:26:01 -05:00
parent 867e7495a5
commit 97ae458c4b

View File

@ -159,6 +159,16 @@ class Macros:
if usbCode in self.macros[ self.layer ][ macro ]:
scanCodeList.append( macro )
if len(scanCodeList) == 0:
if len(usbCode) > 1 or len(usbCode[0]) > 1:
for combo in usbCode:
comboCodes = list()
for key in combo:
scanCode = self.lookupUSBCodes(((key,),))
comboCodes.append(scanCode[0][0][0])
scanCodeList.append(tuple(code for code in comboCodes))
scanCodeList = [tuple(scanCodeList)]
return scanCodeList
# Cache USBCode Assignment