Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/KeyBindingsPanel.cs35
1 files changed, 30 insertions, 5 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/KeyBindingsPanel.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/KeyBindingsPanel.cs
index 020b963c57..4a8ea03109 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/KeyBindingsPanel.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/KeyBindingsPanel.cs
@@ -380,6 +380,21 @@ namespace MonoDevelop.Ide.Gui.OptionPanels
CurrentSelectedBinding = null;
}
}
+
+ void ResetAccelEntry ()
+ {
+ CurrentKey = string.Empty;
+ accelIncomplete = false;
+ accelComplete = false;
+ chord = null;
+ }
+
+ static bool GetIsFocusSwitchKey (Gdk.EventKey e)
+ {
+ // TAB to focus next or SHIFT+TAB to focus previous
+ return (e.Key == Gdk.Key.Tab || e.Key == Gdk.Key.ISO_Left_Tab)
+ && (e.State == Gdk.ModifierType.None || e.State == Gdk.ModifierType.ShiftMask);
+ }
[GLib.ConnectBefore]
void OnAccelEntryKeyPress (object sender, KeyPressEventArgs e)
@@ -390,14 +405,24 @@ namespace MonoDevelop.Ide.Gui.OptionPanels
e.RetVal = true;
if (accelComplete) {
- CurrentKey = String.Empty;
- accelIncomplete = false;
- accelComplete = false;
- chord = null;
-
+ // allow Gtk to handle the TAB combo (a11y: keyboard only users need to be able to move the focus)
+ if (GetIsFocusSwitchKey (e.Event)) {
+ e.RetVal = false;
+ return;
+ }
+ ResetAccelEntry ();
if (key == Gdk.Key.BackSpace)
return;
}
+ // TAB / SHIFT-TAB are reserved and can not be used as chords
+ if (chord == null) {
+ if (GetIsFocusSwitchKey (e.Event)) {
+ ResetAccelEntry ();
+ // allow Gtk to handle the TAB combo (a11y: keyboard only users need to be able to move the focus)
+ e.RetVal = false;
+ return;
+ }
+ }
accelComplete = false;
bool combinationComplete;