Пример #1
0
 /// <summary>
 /// Grabs keyboard and prepares to catch key combination (which is emitted in HotkeyGrabbed event).
 /// </summary>
 /// <param name="hotkeyGrabbedFunc">Function called when hotkey is grabbed.</param>
 public void GrabKeyboard(HotkeyGrabbed hotkeyGrabbedFunc)
 {
     this.hotkeyGrabbedFunc = hotkeyGrabbedFunc;
     this.regrab            = this.enabled;
     this.Enabled           = false;
     Keyboard.Grab(this.RootWindow, false, 0);
     this.RootWindow.AddFilter(this.OnHotkeyGrabbed);
 }
Пример #2
0
 /// <summary>
 /// Grabs keyboard and prepares to catch key combination (which is emitted in HotkeyGrabbed event).
 /// </summary>
 /// <param name="hotkeyGrabbedFunc">Function called when hotkey is grabbed.</param>
 public void GrabKeyboard(HotkeyGrabbed hotkeyGrabbedFunc)
 {
     this.hotkeyGrabbedFunc = hotkeyGrabbedFunc;
     this.regrab = this.enabled;
     this.Enabled = false;
     Keyboard.Grab(this.RootWindow, false, 0);
     this.RootWindow.AddFilter(this.OnHotkeyGrabbed);
 }