namespace Terminal.Gui.App;
public static partial class Application // Navigation stuff
{
///
/// Gets the instance for the current .
///
[Obsolete ("The legacy static Application object is going away.")]
public static ApplicationNavigation? Navigation
{
get => ApplicationImpl.Instance.Navigation;
internal set => ApplicationImpl.Instance.Navigation = value;
}
private static Key _nextTabGroupKey = Key.F6; // Resources/config.json overrides
/// Alternative key to navigate forwards through views. Ctrl+Tab is the primary key.
[ConfigurationProperty (Scope = typeof (SettingsScope))]
public static Key NextTabGroupKey
{
get => _nextTabGroupKey;
set
{
Key oldValue = _nextTabGroupKey;
_nextTabGroupKey = value;
NextTabGroupKeyChanged?.Invoke (null, new ValueChangedEventArgs (oldValue, _nextTabGroupKey));
}
}
/// Raised when changes.
public static event EventHandler>? NextTabGroupKeyChanged;
private static Key _nextTabKey = Key.Tab; // Resources/config.json overrides
/// Alternative key to navigate forwards through views. Tab is the primary key.
[ConfigurationProperty (Scope = typeof (SettingsScope))]
public static Key NextTabKey
{
get => _nextTabKey;
set
{
Key oldValue = _nextTabKey;
_nextTabKey = value;
NextTabKeyChanged?.Invoke (null, new ValueChangedEventArgs (oldValue, _nextTabKey));
}
}
/// Raised when changes.
public static event EventHandler>? NextTabKeyChanged;
///
/// Raised when the user releases a key.
///
/// Set to to indicate the key was handled and to prevent
/// additional processing.
///
///
///
/// All drivers support firing the event. Some drivers (Unix) do not support firing the
/// and events.
/// Fired after .
///
[Obsolete ("The legacy static Application object is going away.")]
public static event EventHandler? KeyUp
{
add => ApplicationImpl.Instance.Keyboard.KeyUp += value;
remove => ApplicationImpl.Instance.Keyboard.KeyUp -= value;
}
private static Key _prevTabGroupKey = Key.F6.WithShift; // Resources/config.json overrides
/// Alternative key to navigate backwards through views. Shift+Ctrl+Tab is the primary key.
[ConfigurationProperty (Scope = typeof (SettingsScope))]
public static Key PrevTabGroupKey
{
get => _prevTabGroupKey;
set
{
Key oldValue = _prevTabGroupKey;
_prevTabGroupKey = value;
PrevTabGroupKeyChanged?.Invoke (null, new ValueChangedEventArgs (oldValue, _prevTabGroupKey));
}
}
/// Raised when changes.
public static event EventHandler>? PrevTabGroupKeyChanged;
private static Key _prevTabKey = Key.Tab.WithShift; // Resources/config.json overrides
/// Alternative key to navigate backwards through views. Shift+Tab is the primary key.
[ConfigurationProperty (Scope = typeof (SettingsScope))]
public static Key PrevTabKey
{
get => _prevTabKey;
set
{
Key oldValue = _prevTabKey;
_prevTabKey = value;
PrevTabKeyChanged?.Invoke (null, new ValueChangedEventArgs (oldValue, _prevTabKey));
}
}
/// Raised when changes.
public static event EventHandler>? PrevTabKeyChanged;
}