M4L key release detection for key mapping?

tada's icon

Can i detect somehow key release for a "mapped key" from pc-keyboard?
(for example when i push z key i want to take 1 and when i release it to take 0 )

thanks in advance!
any new direction would be very helpful!

windows 7 (i know that there is aka.keyboard external only for Mac OS)