[gnome-shell] main: Ignore some modifiers when matching events to keybindings
- From: Florian MÃllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] main: Ignore some modifiers when matching events to keybindings
- Date: Tue, 13 Mar 2012 19:35:33 +0000 (UTC)
commit 93a004b016751960455f9a546465fc6b7cc89aa3
Author: Florian MÃllner <fmuellner gnome org>
Date: Tue Mar 13 16:25:50 2012 +0100
main: Ignore some modifiers when matching events to keybindings
Some modifiers like NumLock or ScrollLock don't make sense in
keybindings, which is why we ignore them in mutter when matching
events to keybindings; for keybindings in the overview, we do
the matching ourselves, so filter the same modifiers as mutter.
https://bugzilla.gnome.org/show_bug.cgi?id=665215
js/ui/main.js | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/main.js b/js/ui/main.js
index c90df06..a71acba 100644
--- a/js/ui/main.js
+++ b/js/ui/main.js
@@ -586,7 +586,8 @@ function _globalKeyPressHandler(actor, event) {
let symbol = event.get_key_symbol();
let keyCode = event.get_key_code();
- let modifierState = event.get_state();
+ let ignoredModifiers = global.display.get_ignored_modifier_mask();
+ let modifierState = event.get_state() & ~ignoredModifiers;
// This relies on the fact that Clutter.ModifierType is the same as Gdk.ModifierType
let action = global.display.get_keybinding_action(keyCode, modifierState);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]