1

I want to know how can i detect which key pressed (for example on Desktop or my computer ). when detect pressed key show it with MessageBox

how can i do this?

KF2
  • 9,421
  • 8
  • 39
  • 76
  • Duplicate http://stackoverflow.com/questions/1100285/how-to-detect-the-currently-pressed-key ? – Ankush Sep 03 '12 at 17:35
  • @Ankush: No, that one is about detecting keys pressed in *your* app. I'm sure there *is* a duplicate of global keyboard hooks on SO though. – Eric J. Sep 03 '12 at 17:35
  • possible duplicate of [C# : Keyboard Hook](http://stackoverflow.com/questions/10391025/c-sharp-keyboard-hook) – Eric J. Sep 03 '12 at 17:36

1 Answers1

1

Detecting the key presses outside of your application requires installing a Low Level Keyboard Hook. Here is a CodeProject article demonstrating the process.

Reed Copsey
  • 539,124
  • 75
  • 1,126
  • 1,354