This is entirely implementation dependent, as regards both hardware platforms and operating systems. You don't mention any of those things. Keyboards put out hardware signals; between there and you, a number of people mess with them in quite different ways.