Well you can create a hidden db window. It might be possible.
*runs off to play*
The problem is that if you want the application hidden, there's no way to properly terminate it, thus the file is never closed. Also, I'm not entirely sure if the keys are even being read anyway when the window is hidden.
if file exist("c:\keys.txt") then delete file "c:\keys.txt"
open to write 1, "c:\keys.txt"
do
cls
if scancode() and flag = 0
flag = 1
key = scancode()
write string 1, str$(key)
`set cursor 0,0
`print "key: ",chr$(key)
endif
if scancode() <> key then flag = 0
loop
close file 1
"eureka" - Archimedes
