Click here to Skip to main content
15,907,329 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
do
{
    Keypress = Console.ReadKey();
    Console.WriteLine("  Your Key is : " + Keypress.KeyChar);

    if ((ConsoleModifiers.Alt & Keypress.Modifiers) != 0)         
        Console.WriteLine(" Alt Key pressed: ");
                
    if ((ConsoleModifiers.Control & Keypress.Modifiers) != 0)
        Console.WriteLine(" Control Key pressed:");

    if ((ConsoleModifiers.Shift & Keypress.Modifiers) != 0)
        Console.WriteLine(" shift key pressed:");
}
while (Keypress.KeyChar != 'Q');


thanks for valuable replay
Posted
Updated 21-Nov-11 1:09am
v2
Comments
lukeer 21-Nov-11 7:10am    
Edit: added pre tags

1 solution

 
Share this answer
 
Comments
2011999 21-Nov-11 10:20am    
thank u for your replay solve my problem
Anuja Pawar Indore 22-Nov-11 0:55am    
Welcome :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900