neutron.py

Created by gasmat2012

Created on December 14, 2025

588 Bytes


from math import *
from ion import *

keys = {KEY_ZERO:'0',KEY_ONE:'1',KEY_TWO:'2',KEY_THREE:'3',KEY_FOUR:'4',KEY_FIVE:'5',KEY_SIX:'6',KEY_SEVEN:'7',KEY_EIGHT:'8',KEY_NINE:'9'}

def text(str=''):
  text = ''
  while True:
    for k in keys:
      if keydown(k):
        text += keys[k]
    if keydown(KEY_OK):
      return print(text)

def anykey():
  k = []
  for key in range(46):
    k.append(keydown(key))
  return any(k)

def getkeys(kn=1):
  k = []
  for key in range(52):
    if keydown(key):
      k.append(key)
  if len(k) > 0:
    return k
  else:
    return None

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.