locked
How do I get key press value as a string?

    Question

  • How do I do this without the if statement (just get the value into ta string variable)

     

    	void KeyDown(CoreWindow^ Window, KeyEventArgs^ Args)
        {
    		
    		if(Args->VirtualKey == VirtualKey::A)
            {
                // do something...
    			MessageDialog Dialog("You pressed A", "!");
    			 Dialog.ShowAsync();
            }
    		
           
        }

    But what I want is something like

    string myKey = VirtualKeyPress.Value.ToString()

     but in C++ notation
    Tuesday, June 25, 2013 1:14 AM

Answers