I want to measure time (seconds) when a user presses the right arrow key on the keyboard and pick it up.
I have researched about this and find some page but there is not a good answer.
How can I measure this time?
I define a List in top of class:
List<int> date_down = new List<int>();
if (e.Key == Key.Right)
var second = DateTime.Now.Second - date_down;
You could start with looking up various classes for measuring time in C#, such as this one.
You will also need a class for detecting key down and key up. Perhaps this might help.
Beyond this, the implementation should be fairly simple. Start the timer when the key is pressed down, stop the timer when the key is released, and use that time as the measurement between when the two events.