How to know Shift key status when a key is pressed in C?

Go To StackoverFlow.com

3

I want to write a program that waits until CTRL + SHIFT + A is pressed and then it prints "Hello World!". I'm using MacOSX and I want it to be Console-Based.

2012-04-05 15:07
by The Pianist


3

If "Console-Based" means that the program must run in a terminal, it cannot distinguish Ctrl+A from Ctrl+Shift+A; both produce the same input.

2012-04-05 15:10
by Jouni K. Seppänen
I think there should be a way - The Pianist 2012-04-05 15:14
a terminal/console would have to be able to distinguish between the two and it just can't - dldnh 2012-04-05 16:08
Ads