OSDN Git Service

Don't treat caps lock like shift.
authorJon Nordby <jononor@gmail.com>
Tue, 15 Jun 2010 20:30:59 +0000 (22:30 +0200)
committerJon Nordby <jononor@gmail.com>
Tue, 15 Jun 2010 20:30:59 +0000 (22:30 +0200)
https://gna.org/bugs/?15362

gui/keyboard.py

index 0be489f..768203a 100644 (file)
@@ -70,7 +70,7 @@ class KeyboardManager:
         modifiers = event.state & gtk.accelerator_get_default_mod_mask() & ~consumed_modifiers
         # Except that key bindings are always stored in lowercase.
         keyval = gdk.keyval_to_lower(event.keyval)
-        if keyval != event.keyval:
+        if keyval != event.keyval and not event.get_state() & gdk.LOCK_MASK:
             modifiers |= gdk.SHIFT_MASK
         action = self.keymap.get((keyval, modifiers))
         if not action: