Code archives/Miscellaneous/Key Logging Noise

This code has been declared by its author to be Public Domain code.

Download source code

Key Logging Noise by superStruct2009
This program takes advantage of the SystemBeep dll that is available in the toolbox section. What this program does is that it takes the ASCII value of the keys that you press and plays a note for a duration corresponding to the key you hit. It has a key logging capacity of 1000 characters which allows for playback of the key noise by hitting the ENTER key. If you hit the ENTER key it won't delete the key logs so in order to delete it all you have to hit the DELETE key. The backspace key clears the last key hit, including the backspace key itself, making this an easier tool. WARNING: There are some unknown effects of holding the SHIFT key down while typing. It may cause the program to become non-responsive. You have been warned. Also in order for this program to work you need to have downloaded the SystemBeep dll and placed it in the UserLib section of the Blitz3D program folder to make it work.
Graphics 80,100,0,2
SetBuffer BackBuffer()
AppTitle "KeyNoise"

Global x
Global y
Global counter = 0
Global Key

Dim keymem(1000)

While Not KeyDown(1)
	Cls
	Key = GetKey()
	If Key <> 0 
		keymem(counter) = Key
		SystemBeep(Key*5,Key)
		counter = counter + 1
	EndIf
	If KeyHit(14)
		keymem(counter) = 0
		keymem(counter - 1) = 0
		counter = counter - 2
	EndIf 
	If KeyHit(28) = 1
		For i = 0 To counter
			SystemBeep(keymem(i)*5,keymem(i))
		Next
	EndIf
	If KeyHit(211)
		For i = 0 To counter
			keymem(i) = 0
		Next
	EndIf
Wend

Comments

None.

Code Archives Forum