Replace #define UNIX_KEY_BINDINGS with conditional PlatformID.Unix.

This commit is contained in:
BDisp
2024-05-30 13:44:37 +01:00
parent 1e7263be73
commit 219458658f

View File

@@ -1,7 +1,3 @@
#define UNIX_KEY_BINDINGS
using System.Net.Mime;
namespace Terminal.Gui;
/// <summary>
@@ -126,8 +122,12 @@ public partial class Toplevel : View
KeyBindings.Add (Application.AlternateForwardKey, Command.NextViewOrTop); // Needed on Unix
KeyBindings.Add (Application.AlternateBackwardKey, Command.PreviousViewOrTop); // Needed on Unix
if (Environment.OSVersion.Platform == PlatformID.Unix)
{
KeyBindings.Add (Key.Z.WithCtrl, Command.Suspend);
}
#if UNIX_KEY_BINDINGS
KeyBindings.Add (Key.Z.WithCtrl, Command.Suspend);
KeyBindings.Add (Key.L.WithCtrl, Command.Refresh); // Unix
KeyBindings.Add (Key.F.WithCtrl, Command.NextView); // Unix
KeyBindings.Add (Key.I.WithCtrl, Command.NextView); // Unix