key_code.py

Created by cent20

Created on August 15, 2023

328 Bytes

📙 Découvrir la NumWorks p.44 Téléverser ce script sur votre calculatrice pour le tester.
Le simulateur en ligne ne gère que très peu de touches, (les flèches, la touche Entrée)


# Découvrir la NumWorks p.44 
# https://amzn.to/3s7Q4uZ

from ion import keydown
from time import sleep
 
def getkey():
  while True:
    for i in range(53):
      if keydown(i):
        return i

key = None
while key!=5:
  print("Press a key ...")
  key = getkey()
  print("key pressed = ", key)
  sleep(0.404)

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 <a href="https://www.numworks.com/legal/cookies-policy/">cookies policy</a>.