receiver: handle gmask 0 and group 0 in reprogrammable keys
This commit is contained in:
parent
a4bf1da6f9
commit
66c8621cab
|
@ -362,12 +362,13 @@ def _feature_reprogrammable_keys_choices(device):
|
|||
for k in keys:
|
||||
if k[2] & _special_keys.KEY_FLAG.reprogrammable:
|
||||
key_choices = [ k[1] ] # it should always be possible to map the key to itself
|
||||
for g in range(1,9):
|
||||
if k[3] & 2**(g-1):
|
||||
for g in range(0,9):
|
||||
if ( k[3]==0 if g==0 else k[3] & 2**(g-1) ):
|
||||
for gm in groups[g]:
|
||||
if int(gm) != int(k[0]): # don't put itself in twice
|
||||
key_choices.append(gm)
|
||||
choices[k[0]] = key_choices
|
||||
if len(key_choices) > 1:
|
||||
choices[k[0]] = key_choices
|
||||
return choices
|
||||
|
||||
def _feature_reprogrammable_keys():
|
||||
|
|
Loading…
Reference in New Issue