Version

KeyActionMappings Property (UltraExplorerBar)

Returns an UltraExplorerBarKeyActionMappingsCollection object that provides the ability to reconfigure the way the control responds to user keystrokes.
Syntax
'Declaration
 
Public ReadOnly Property KeyActionMappings As UltraExplorerBarKeyActionMappingsCollection
public UltraExplorerBarKeyActionMappingsCollection KeyActionMappings {get;}
Remarks

This property provides access to the UltraExplorerBar's mechanism for handling keyboard input from users. All keystrokes for actions such as selection, navigation and editing are stored in a table-based system that you can examine and modify using this property. Through the KeyActionsMappings property, you can customize the keyboard behavior for an UltraExplorerBar control in your application.

For example, if you wanted users to be able to navigate between UltraExplorerBarGroups by pressing the F8 key, you could add this behavior. You can specify the key code and any special modifier keys associated with an action, as well as determine whether a key mapping applies in a given context.

The following table lists the default key mappings for the UltraExplorerBar control:

KeyCode ActionCode StateRequired StateDisallowed SpecialKeysRequired SpecialKeysDisallowed
Up ActivatePreviousGroupOrItem ActiveGroupOrItemExists InEditMode, VisualStudio2005ToolboxMode
Up ActivateAndCheckPreviousGroupOrItem ActiveGroupOrItemExists, VisualStudio2005ToolboxMode InEditMode Ctrl
Up ActivateAndCheckLastItemInPreviousGroup ActiveGroupOrItemExists, VisualStudio2005ToolboxMode InEditMode Ctrl
Up ActivatePreviousGroup OutlookNavigationPaneMode, QuickCustomizeButtonActive InEditMode
Down ActivateNextGroupOrItem ActiveGroupOrItemExists InEditMode, VisualStudio2005ToolboxMode
Down ActivateAndCheckNextGroupOrItem ActiveGroupOrItemExists, VisualStudio2005ToolboxMode InEditMode Ctrl
Down ActivateAndCheckFirstItemInNextGroup ActiveGroupOrItemExists, VisualStudio2005ToolboxMode InEditMode Ctrl
Down ActivateQuickCustomizeButton ActiveGroupExists, OutlookNavigationPaneMode, ActiveGroupIsLastActivateableGroup InEditMode
Down DoNothing OutlookNavigationPaneMode, QuickCustomizeButtonActive InEditMode
Prior ScrollPageUp ActiveItemExists, ListbarMode, ActiveItemIsFirstCurrentlyVisibleItemInGroup InEditMode
Prior ScrollPageUp ActiveGroupOrItemExists, ExplorerBarMode, ActiveGroupOrItemIsFirstCurrentlyVisibleGroupOrItem InEditMode
Prior ScrollPageUpThenActivateAndCheckFirstVisibleGroupOrItem ActiveGroupOrItemExists, ActiveGroupOrItemIsFirstCurrentlyVisibleGroupOrItem, VisualStudio2005ToolboxMode InEditMode
Prior ActivateAndCheckFirstCurrentlyVisibleGroupOrItem ActiveGroupOrItemExists, VisualStudio2005ToolboxMode InEditMode, ActiveGroupOrItemIsFirstCurrentlyVisibleGroupOrItem
Prior ActivateFirstCurrentlyVisibleItem ActiveItemExists, ListbarMode, OutlookNavigationPaneMode InEditMode
Prior ActivateFirstCurrentlyVisibleGroupOrItem ActiveGroupOrItemExists, ExplorerBarMode InEditMode, ActiveGroupOrItemIsFirstCurrentlyVisibleGroupOrItem
Next ScrollPageDown ActiveItemExists, ListbarMode, ActiveItemIsLastCurrentlyVisibleItemInGroup InEditMode
Next ScrollPageDown ActiveGroupOrItemExists, ExplorerBarMode, ActiveGroupOrItemIsLastCurrentlyVisibleGroupOrItem InEditMode
Next ScrollPageDownThenActivateAndCheckLastVisibleGroupOrItem ActiveGroupOrItemExists, ActiveGroupOrItemIsLastCurrentlyVisibleGroupOrItem, VisualStudio2005ToolboxMode InEditMode
Next ActivateLastCurrentlyVisibleItem ActiveItemExists InEditMode, VisualStudio2005ToolboxMode
Next ActivateLastCurrentlyVisibleGroupOrItem ActiveGroupOrItemExists, ExplorerBarMode InEditMode, ActiveGroupOrItemIsLastCurrentlyVisibleGroupOrItem
Next ActivateAndCheckLastCurrentlyVisibleGroupOrItem ActiveGroupOrItemExists, VisualStudio2005ToolboxMode InEditMode, ActiveGroupOrItemIsLastCurrentlyVisibleGroupOrItem
Enter ClickActiveGroup ActiveGroupExists, ListbarMode InEditMode, ActiveGroupIsSelected
Enter ClickActiveGroup ActiveGroupExists, OutlookNavigationPaneMode InEditMode, ActiveGroupIsSelected
Enter ClickActiveGroup ActiveGroupExists, ExplorerBarMode InEditMode
Enter ClickActiveGroup ActiveGroupExists, VisualStudio2005ToolboxMode InEditMode
Enter ClickActiveItem ActiveItemExists InEditMode
Space ClickActiveItem ActiveItemExists InEditMode
Enter ExitEditMode InEditMode
Enter DisplayQuickCustomizeMenu OutlookNavigationPaneMode, QuickCustomizeButtonActive InEditMode
Space ClickActiveGroup ActiveGroupExists, ListbarMode InEditMode, ActiveGroupIsSelected
Space ClickActiveGroup ActiveGroupExists, OutlookNavigationPaneMode InEditMode, ActiveGroupIsSelected
Space ClickActiveGroup ActiveGroupExists, ExplorerBarMode InEditMode
Space DisplayQuickCustomizeMenu OutlookNavigationPaneMode, QuickCustomizeButtonActive InEditMode
Escape ExitEditMode InEditMode
Home ActivateFirstGroup ActiveGroupExists InEditMode, VisualStudio2005ToolboxMode
Home ActivateFirstGroup InEditMode, VisualStudio2005ToolboxMode Shift
Home ActivateFirstItemInSameGroup ActiveItemExists ActiveItemIsFirstItemInGroup, InEditMode, VisualStudio2005ToolboxMode
Home ActivateAndCheckFirstItemInSameGroup ActiveGroupOrItemExists, VisualStudio2005ToolboxMode ActiveItemIsFirstItemInGroup, InEditMode Ctrl
Home ActivateAndCheckFirstGroup ActiveGroupOrItemExists, VisualStudio2005ToolboxMode InEditMode Ctrl
Home ActivateGroupContainingActiveItem ActiveItemExists, ActiveItemIsFirstItemInGroup InEditMode, VisualStudio2005ToolboxMode
Tab ActivateFirstGroupOrItem ActivateableGroupOrItemExists ActiveGroupOrItemExists, InEditMode, VisualStudio2005ToolboxMode Shift
Tab TabNextFromActiveGroupOrItem CanTabNextFromActiveGroupOrItem InEditMode, VisualStudio2005ToolboxMode Shift
Tab TabPreviousFromActiveGroupOrItem CanTabPreviousFromActiveGroupOrItem InEditMode, VisualStudio2005ToolboxMode Shift
Tab ActivateLastGroupOrItem ActivateableGroupOrItemExists ActiveGroupOrItemExists, InEditMode, VisualStudio2005ToolboxMode Shift
Tab ActivateAndCheckNextGroupOrItem ActiveItemExists, VisualStudio2005ToolboxMode ActiveItemIsLastItemInGroup, InEditMode Shift
Tab ActivateAndCheckFirstItemInSameGroup ActiveItemExists, ActiveItemIsLastItemInGroup, VisualStudio2005ToolboxMode InEditMode Shift
Tab ActivateAndCheckFirstItemInSameGroup ActiveGroupExists, VisualStudio2005ToolboxMode InEditMode Shift
Tab ActivateAndCheckPreviousGroupOrItem ActiveItemExists, VisualStudio2005ToolboxMode ActiveItemIsFirstItemInGroup, InEditMode Shift
Tab ActivateAndCheckLastItemInSameGroup ActiveItemExists, ActiveItemIsFirstItemInGroup, VisualStudio2005ToolboxMode InEditMode Shift
Tab ActivateAndCheckLastItemInSameGroup ActiveGroupExists, VisualStudio2005ToolboxMode InEditMode Shift
End ActivateLastGroup ActiveItemIsLastItemInGroup, ListbarMode InEditMode, LastGroupIsSelected
End ActivateLastItemInLastGroup ActiveItemExists, ActiveItemIsLastItemInGroup, ExplorerBarMode InEditMode Shift
End ActivateLastItemInLastGroup ExplorerBarMode InEditMode Shift
End ActivateLastItemInLastGroup ActiveGroupExists, ExplorerBarMode ActiveGroupExpanded, InEditMode
End ActivateLastItemInLastGroup ListbarMode, LastGroupIsSelected InEditMode
End ActivateLastItemInSameGroup ActiveGroupOrItemExists ActiveItemIsLastItemInGroup, InEditMode, VisualStudio2005ToolboxMode Shift
End ActivateAndCheckLastItemInSameGroup ActiveGroupOrItemExists, VisualStudio2005ToolboxMode ActiveItemIsLastItemInGroup, InEditMode Ctrl
End ActivateAndCheckLastGroup ActivateableGroupOrItemExists, VisualStudio2005ToolboxMode InEditMode, LastGroupIsSelected Ctrl
F2 EditActiveGroup ActiveGroupExists, ActiveGroupOrItemIsEditable
F2 EditActiveItem ActiveItemExists, ActiveGroupOrItemIsEditable
Right ActivateNextGroup ActiveGroupExists, ExplorerBarMode, IsMultiColumn ActiveGroupIsLastGroup, InEditMode
Right ActivateNextGroup ActiveItemExists, ExplorerBarMode, IsMultiColumn ActiveItemIsInLastGroup, GroupFollowingActiveItemGroupExpanded, InEditMode
Right ActivateNextGroup ActiveGroupExists, OutlookNavigationPaneMode InEditMode, ActiveGroupIsLastActivateableGroup
Right ActivateFirstItemInNextGroup ActiveItemExists, GroupFollowingActiveItemGroupExpanded, ExplorerBarMode, IsMultiColumn ActiveItemIsInLastGroup, InEditMode
Right ActivateQuickCustomizeButton ActiveGroupExists, OutlookNavigationPaneMode, ActiveGroupIsLastActivateableGroup InEditMode
Right DisplayQuickCustomizeMenu OutlookNavigationPaneMode, QuickCustomizeButtonActive InEditMode
Right ClickActiveGroup ActiveGroupExists, VisualStudio2005ToolboxMode ActiveGroupExpanded, InEditMode
Left ActivatePreviousGroup ActiveGroupExists, ExplorerBarMode, IsMultiColumn ActiveGroupIsFirstGroup, InEditMode
Left ActivatePreviousGroup ActiveItemExists, ExplorerBarMode, IsMultiColumn ActiveItemIsInFirstGroup, GroupPreceedingActiveItemGroupExpanded, InEditMode
Left ActivatePreviousGroup ActiveGroupExists, OutlookNavigationPaneMode InEditMode
Left ActivatePreviousGroup OutlookNavigationPaneMode, QuickCustomizeButtonActive InEditMode
Left ActivateFirstItemInPreviousGroup ActiveItemExists, GroupPreceedingActiveItemGroupExpanded, ExplorerBarMode, IsMultiColumn ActiveItemIsInFirstGroup, InEditMode
Left ClickActiveGroup ActiveGroupExists, ActiveGroupExpanded, VisualStudio2005ToolboxMode InEditMode

Example
The following code demonstrates how to create a KeyActionMapping and add it to the control's KeyActionMappings collection.

Imports System.Diagnostics
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinExplorerBar


	Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button10.Click

		' Add a key action mapping that will activate the first group in the control when the
		' F3 key is pressed, but only when the control style is ExplorerBar and the control is
		' not currently editing a Group or Item name.
		Dim myKeyActionMapping As UltraExplorerBarKeyActionMapping = _
			New UltraExplorerBarKeyActionMapping(Keys.F3, _
					  UltraExplorerBarAction.ActivateFirstGroup, _
					  UltraExplorerBarStates.ActiveGroupIsFirstGroup Or UltraExplorerBarStates.InEditMode, _
					  UltraExplorerBarStates.ExplorerBarMode, _
					  0, _
					  0)

		Me.ultraExplorerBar1.KeyActionMappings.Add(myKeyActionMapping)


		' Find the any keyaction mappings that invoke the ActivateLastGroup action and add disallowed
		' and required states.
		Dim keyActionMapping As UltraExplorerBarKeyActionMapping

		For Each keyActionMapping In Me.ultraExplorerBar1.KeyActionMappings
			If (keyActionMapping.ActionCode = UltraExplorerBarAction.ActivateLastGroup) Then
				keyActionMapping.StateDisallowed = keyActionMapping.StateDisallowed Or UltraExplorerBarStates.ListbarMode
				keyActionMapping.StateRequired = keyActionMapping.StateRequired Or UltraExplorerBarStates.ActiveItemIsFirstItemInGroup
			End If
		Next

	End Sub
using System.Diagnostics;
using Infragistics.Win;
using Infragistics.Win.UltraWinExplorerBar;


		private void button10_Click(object sender, System.EventArgs e)
		{
			// Add a key action mapping that will activate the first group in the control when the
			// F3 key is pressed, but only when the control style is ExplorerBar and the control is
			// not currently editing a Group or Item name.
			UltraExplorerBarKeyActionMapping myKeyActionMapping = 
						new UltraExplorerBarKeyActionMapping(Keys.F3,
															 UltraExplorerBarAction.ActivateFirstGroup,
															 UltraExplorerBarStates.ActiveGroupIsFirstGroup | UltraExplorerBarStates.InEditMode,
															 UltraExplorerBarStates.ExplorerBarMode,
															 0,
															 0);
															 
			this.ultraExplorerBar1.KeyActionMappings.Add(myKeyActionMapping);


			// Find the any keyaction mappings that invoke the ActivateLastGroup action and add disallowed
			// and required states.
			foreach(UltraExplorerBarKeyActionMapping keyActionMapping in this.ultraExplorerBar1.KeyActionMappings)
			{
				if (keyActionMapping.ActionCode == UltraExplorerBarAction.ActivateLastGroup)
				{
					keyActionMapping.StateDisallowed	|= UltraExplorerBarStates.ListbarMode;
					keyActionMapping.StateRequired	|= UltraExplorerBarStates.ActiveItemIsFirstItemInGroup;
				}
			}
		}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also