using System; using System.Collections; using Gtk; namespace LastExit { public class PlayerWindow : Window { private bool accel_group_active = true; private void OnKeyPressEvent(object o, KeyPressEventArgs args) { bool handled = false; if(PlayerWindow.Focus is Entry && Gtk.Global.CurrentEvent is Gdk.EventKey) { if(accel_group_active) { PlayerWindow.RemoveAccelGroup(Globals.ActionManager.Ui.AccelGroup); accel_group_active = false; } else { if(!accel_group_active) { PlayerWindow.AddAccelGroup(Globals.ActionManager.UI.AccelGroup); accel_group_active = true; } } switch(args.Event.Key) { case Gdk.Key.n: case Gdk.Key.N: Driver.connection.Skip (); handled = true; break; } args.RetVal = handled; } } } }