From 044f01eb5ae572488bb041e055d22f79d56bcd6f Mon Sep 17 00:00:00 2001 From: Latif Khalifa Date: Thu, 15 Oct 2009 16:04:00 +0000 Subject: [PATCH] RAD-47: rework tab navigation to adopt a firefox like set of shortcut keys (now uses standard ctr-tab for next tab, ctrl-shift-tab for previous tab) git-svn-id: https://radegast.googlecode.com/svn/trunk@348 f7a694da-4d33-11de-9ad6-1127a62b9fcd --- Radegast/GUI/Dialogs/MainForm.cs | 31 ++++++++++--------------------- 1 file changed, 10 insertions(+), 21 deletions(-) diff --git a/Radegast/GUI/Dialogs/MainForm.cs b/Radegast/GUI/Dialogs/MainForm.cs index 6aed21e..3040d5b 100644 --- a/Radegast/GUI/Dialogs/MainForm.cs +++ b/Radegast/GUI/Dialogs/MainForm.cs @@ -432,18 +432,21 @@ namespace Radegast e.Handled = e.SuppressKeyPress = true; } - if (e.Control && e.KeyCode == Keys.Right) - { - e.Handled = e.SuppressKeyPress = true; - } - - if (e.Control && e.KeyCode == Keys.Left) + // ctrl-(shift)-tab for next/previous tab + if (e.Control && e.KeyCode == Keys.Tab) { + if (e.Shift) + { + TabConsole.SelectPreviousTab(); + } + else + { + TabConsole.SelectNextTab(); + } e.Handled = e.SuppressKeyPress = true; } } - private void frmMain_KeyUp(object sender, KeyEventArgs e) { // ctrl-o, open objects finder @@ -467,20 +470,6 @@ namespace Radegast MapToCurrentLocation(); e.Handled = e.SuppressKeyPress = true; } - - // ctrl-right_arrow, select next tab - if (e.Control && e.KeyCode == Keys.Right) - { - TabConsole.SelectNextTab(); - e.Handled = e.SuppressKeyPress = true; - } - - // ctrl-right_arrow, select previous tab - if (e.Control && e.KeyCode == Keys.Left) - { - TabConsole.SelectPreviousTab(); - e.Handled = e.SuppressKeyPress = true; - } } -- 2.11.0