Hello friends,,,
how to detection keyboard even but with double pressing like Ctrl+c or other ...???
Hello friends,,,
how to detection keyboard even but with double pressing like Ctrl+c or other ...???
Well that depends on your platform.
Ctrl-C in windows typically copies things to the clipboard.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
"No-one else has reported this problem, you're either crazy or a liar" - Dogbert Technical Support
"Have you tried turning it off and on again?" - The IT Crowd
Simple as that.Code:#include <stdio.h> int main(void) { int c; c = getchar(); if (c == '\a') printf("Caught ^G (0x07)\n"); return 0; }
That's ctrl+g not ctrl+c
You'll need something more elaborate to catch signals (if indeed the OP is working on UNIX).
QuantumPete
"No-one else has reported this problem, you're either crazy or a liar" - Dogbert Technical Support
"Have you tried turning it off and on again?" - The IT Crowd
which platform are you working on, Windows or Unix since the response to pressing Ctrl-C is dependent on that.