Small Basic Forum
Small Basic key tester (w/ no extensions) - Printable Version

+- Small Basic Forum (https://litdev.uk/mybb)
+-- Forum: Small Basic (https://litdev.uk/mybb/forumdisplay.php?fid=1)
+--- Forum: Standard Small Basic (https://litdev.uk/mybb/forumdisplay.php?fid=2)
+--- Thread: Small Basic key tester (w/ no extensions) (/showthread.php?tid=345)



Small Basic key tester (w/ no extensions) - sm4llprogrammer2008 - 05-12-2025

Easy!
This key tester program actually worked! (works in v1.3 and even v1.2)
It also respected the dynamic Y pos thing I tried. So Small Basic even accepts math... I'm thinking of a calculator now.
No dependencies.
ID: HSKG394.000
Link: https://smallbasic.com/program/?HSKG394.000
Code:
GraphicsWindow.Title = "Key Test"
GraphicsWindow.KeyDown = Onkey
y = 0

Sub Onkey
  l = GraphicsWindow.LastKey
  GraphicsWindow.DrawText(0,y,l)
  y = y + 10
EndSub