My customers want to be able to pan the map while they are drawing polygons, etc. They want to use the keyboard arrow keys to do this. I have implemented this in my own custom tracking overlay, but did so by detecting the U, L, R, and D keys. I could not get the arrow keys detected. Are you consuming those? Or is there some trick that I need to implement in order to detect those keypresses. I did see that they are special keys, and you have to do something to make a control pass them through, but I could not make my control that wraps your control detect them. That's why I thought you might be eating them.
How can we detect the arrow keys while tracking?
Ted,
Thanks for your post.
I will create a sample to try it, and let you know why arrow keys don’t work or give you some solutions for it.
Thanks
James
Ted,
I think you want to override protected virtual InteractiveResult KeyDownCore(KeyEventInteractionArguments interactionArguments) method, and pan the map if the key is arrow, however it won’t be called if the arrow key is pressed but works for other keys, I looked at our source code and don’t find any place eats them so far.
And I you might use KeyUpCore instead if you think it doesn’t matter.
I find a solution to solve your problem is that override IsInputKey method, it works but I don’t know if it will cause any other issues, so I need to test more to make sure it’s a good solution and I will check in the source code, you will get the package tommorrow by daily build.
You can look at following link
social.msdn.microsoft.com/forums/en-US/winforms/thread/5a578bc3-2f28-47f5-8058-80206735d4a8
Thanks
James