nicht gentuzt Tasten weiß
This commit is contained in:
parent
9851f2290e
commit
03bf66054d
1 changed files with 13 additions and 12 deletions
|
@ -73,36 +73,37 @@ keybow.keys[0].set_led(*colours[0])
|
||||||
keybow.keys[1].set_led(*colours[1])
|
keybow.keys[1].set_led(*colours[1])
|
||||||
keybow.keys[2].set_led(*colours[2])
|
keybow.keys[2].set_led(*colours[2])
|
||||||
keybow.keys[3].set_led(*colours[3])
|
keybow.keys[3].set_led(*colours[3])
|
||||||
for n in nutzbare_tasten:
|
|
||||||
keybow.keys[n].set_led(*colours[4])
|
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
# Always remember to call keybow.update()!
|
# Always remember to call keybow.update()!
|
||||||
keybow.update()
|
keybow.update()
|
||||||
# wenn layer-auswahl key gedrückt dann..
|
# wenn layer-auswahl key gedrückt dann..
|
||||||
if keys[0].pressed:
|
if keys[0].pressed:
|
||||||
|
# setze ALLE nutzbaren tasten auf weiß
|
||||||
|
for k in nutzbare_tasten:
|
||||||
|
keys[k].set_led(*colours[4])
|
||||||
# setze current layer
|
# setze current layer
|
||||||
current_layer = 0
|
current_layer = 0
|
||||||
# färben zum layer gehörende tasten ein
|
|
||||||
for n in nutzbare_tasten:
|
|
||||||
keybow.keys[n].set_led(*colours[0])
|
|
||||||
elif keys[1].pressed:
|
elif keys[1].pressed:
|
||||||
|
for k in nutzbare_tasten:
|
||||||
|
keys[k].set_led(*colours[4])
|
||||||
current_layer = 1
|
current_layer = 1
|
||||||
for n in nutzbare_tasten:
|
|
||||||
keybow.keys[n].set_led(*colours[1])
|
|
||||||
elif keys[2].pressed:
|
elif keys[2].pressed:
|
||||||
|
for k in nutzbare_tasten:
|
||||||
|
keys[k].set_led(*colours[4])
|
||||||
current_layer = 2
|
current_layer = 2
|
||||||
for n in nutzbare_tasten:
|
|
||||||
keybow.keys[n].set_led(*colours[2])
|
|
||||||
elif keys[3].pressed:
|
elif keys[3].pressed:
|
||||||
|
for k in nutzbare_tasten:
|
||||||
|
keys[k].set_led(*colours[4])
|
||||||
current_layer = 3
|
current_layer = 3
|
||||||
for n in nutzbare_tasten:
|
# färbe zum layer gehörende tasten ein
|
||||||
keybow.keys[n].set_led(*colours[3])
|
for b in layers[current_layer].keys():
|
||||||
|
keys[b].set_led(*colours[current_layer])
|
||||||
# "frage" alle tasten ab
|
# "frage" alle tasten ab
|
||||||
for taste in layers[current_layer].keys():
|
for taste in layers[current_layer].keys():
|
||||||
# wenn gedrückt
|
# wenn gedrückt
|
||||||
if keys[taste].pressed:
|
if keys[taste].pressed:
|
||||||
|
|
||||||
# setze keycode
|
# setze keycode
|
||||||
key_press = layers[current_layer][taste]
|
key_press = layers[current_layer][taste]
|
||||||
# prufe ob taste vor kurzem ausgelöst wurde
|
# prufe ob taste vor kurzem ausgelöst wurde
|
||||||
|
|
Loading…
Reference in a new issue