Closed lukasf closed 11 years ago
Yes I've had this issue for a while, if you see MenuItem, line 88 you'll see that I look for Enter/Space and call OnTapped, but it isn't working. Any suggestions/help you can provide is awesome. Another set of eyes is always good. I have thought about moving to Button but just never have. At this point moving to Button might have adverse side effects and I'd rather not since people are using it and that is more of a fundamental change.
Tim,
Not sure you are going to like my solution, but, here it is anyway: so in MenuItem.OnKeyDown, I have added these lines: // Issue #84: https://github.com/timheuer/callisto/issues/84 // looks like calling base.OnTapped doesn't actually call the tapped // handler, so let's call it directly. Menu menu = TryFindVisualTreeParent
As the title says, currently it is not possible to use the menu with the keyboard. I see two possibilities to solve this. Either attach Key events to the menu items. Or change MenuItemBase to inherit from Button. Then Commmand and Click would come for free, both are automatically called on mouse/tab/key events. Not sure if that would be a good idea, but it is at least an option.
I will probably do some experiments on my own and let you know. But perhaps you already have an idea how you want to do this?