From 97ae458c4bdb28daecf1c69e4adeec0448b4b54a Mon Sep 17 00:00:00 2001 From: Steve McMaster Date: Fri, 27 Feb 2015 23:26:01 -0500 Subject: [PATCH] Add USB Code support for combination and sequence triggers --- kll_lib/containers.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/kll_lib/containers.py b/kll_lib/containers.py index fe00f84..2436c7e 100644 --- a/kll_lib/containers.py +++ b/kll_lib/containers.py @@ -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