Created
June 14, 2024 00:41
-
-
Save branleur/1b2e0df823f663bae67b90cf30bc42cf to your computer and use it in GitHub Desktop.
Dink keyboard key script identifier
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run this in your STORY subdir to generate some key-*.c scripts for testing with | |
from os.path import exists | |
for i in range(24,256): | |
fname = "key-" + str(i) + ".c" | |
if not exists(fname): | |
with open(fname, "w") as f: | |
f.write("void main()\n{\nint &key = " + str(i) + "\n say(\"Key is &key\", 1)\nkill_this_task()\n}") | |
print("Wrote " + fname) | |
else: | |
print("Skipping " + fname) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment