z_test_key.py

Created by cent20

Created on April 19, 2021

541 Bytes

Pour tester le code associé aux touches.


from ion import keydown
from kandinsky import *


draw_string("Test des code touche", 42, 42)
draw_string("     sur le workshop", 42, 62)
k = 0


def wait(buttons=range(53)):  # Attends qu'une des touches précisées soit pressée
    while True:
        for i in buttons:
            if keydown(i):
              return i
                
draw_string("Touche active : trop peu", 2, 102)
draw_string("fleches, entrée, retour, maj", 2, 102)  
                
while k!=48:
  k=wait()
  draw_string("  "+str(k)+"  ", 120, 2)

During your visit to our site, NumWorks needs to install "cookies" or use other technologies to collect data about you in order to:

With the exception of Cookies essential to the operation of the site, NumWorks leaves you the choice: you can accept Cookies for audience measurement by clicking on the "Accept and continue" button, or refuse these Cookies by clicking on the "Continue without accepting" button or by continuing your browsing. You can update your choice at any time by clicking on the link "Manage my cookies" at the bottom of the page. For more information, please consult our cookies policy.