Hi Richard,
So there are really three cases here:
1. Move focus to the editor if the PropertyGridDataAccessorItem has focus and the user starts typing
Support for this is included in the latest release through the PropertyGrid.TextInputFocusDelegates property. This effectively maps a type (i.e. typeof(TextBox) or typeof(ToggleButton)) to an action that should be performed. When PropertyGridDataAccessorItem receives a PreviewTextInput event (from the user typing) then the next focusable control is obtained and the associated action is performed.
This gives you better control over what happens when the user types and the PropertyGridDataAccessorItem has focus. For example, the default action for ToggleButton (which includes CheckBox) is to toggle the value when the space is pressed. So you don't have to press space twice to toggle a check box.
It also allows you to add any custom types, which may need special support.
2. The Enter key should move focus back to the PropertyGridDataAccessorItem (thus committing any changes)
We've added support for this to the next maintenance release. Unlike your code, we perform this in the KeyDown event, not the PreviewKeyDown. We still need to be able to allow the underlying editor to handle the Enter key. But we will ignore Control+Enter, like you do above.
3. The Escape key should move focus back to the PropertyGridDataAccessorItem and cancel any changes
We've added support for this as well, but it's not as straight forward as the Enter key. Here we need to be able to "cancel" changes based on the control that has focus. So TextBox would work like you have shown, but the controls from our Editors for WPF product would need to perform a different action.
To accommodate this, we've added a PropertyGrid.EscapeKeyDownDelegates property which works like the TextInputFocusDelegates property. If the Escape key down event is received by the PropertyGridDataAccessorItem, then it will get the control with focus and try to find an associated delegate to execute. We have pre-defined delegates for TextBox and ComboBox, and if you use our Editors/PropertyGrid Interop there are default delegates for those controls.
So basically, this will cancel changes for the default controls, but still allow customization as needed. But again, this is handled in the KeyDown event, not the PreviewKeyDown. But otherwise, these should easily replace what you have.