
Docker panels consume keyboard and mouse input for combobox controls
Hello,
I am working on a plug-in that uses a docker panel. Some input is being consumed when a combobox control is used by this code fragment:
Controls\DockersTabsControl.cs @ line 288
Code:
protected override void OnKeyDown(KeyEventArgs ke)
{
if(this.Parent is DockersControl)
{
// Only absorb the key press when no focused on an input control, otherwise
// the input controls may not receive certain keys such as delete and arrow keys
DockersControl docker = (this.Parent as DockersControl);
if(!docker.IsFocused)
ke.Handled = true;
}
}
My proposed change is to add the combobox to the list of whitelisted controls here:
Controls\DockersControl.cs @ line 82
Code:
public bool IsFocused
{
get
{
Control ac = FindActiveControl();
// We have focus when we need the keyboard for input
// Otherwise we don't want the focus and the docker may collapse
return (ac is TextBox) || (ac is RichTextBox) || (ac is NumericUpDown) || (ac is ComboBox); <---
}
}
Because the current code consumes certain events for comboboxes, the arrow keys and mouse wheel events are not being raised, which forces the user to drop the list down using the mouse only and also choosing a selection with the mouse only.
If possible, I would like the docker panel to be keyboard accessible and since this box is also a live preview, the ability for a user to wheel through the selections for quick previews.
Thanks!
Xabis