[longomatch] Store lower case keys



commit 126f569955d5a26ce5da74027d8d4257821df47a
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Thu Oct 23 19:36:09 2014 +0200

    Store lower case keys

 LongoMatch.Core/Common/Keyboard.cs |    3 ++-
 LongoMatch.Core/Store/HotKey.cs    |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/LongoMatch.Core/Common/Keyboard.cs b/LongoMatch.Core/Common/Keyboard.cs
index 931a201..bb1a1bd 100644
--- a/LongoMatch.Core/Common/Keyboard.cs
+++ b/LongoMatch.Core/Common/Keyboard.cs
@@ -43,7 +43,8 @@ namespace LongoMatch.Core.Common
                        } else if (evt.State == Gdk.ModifierType.ControlMask) {
                                modifier = (int)KeyvalFromName ("Control_L");
                        }
-                       return new HotKey { Key = (int) evt.KeyValue, Modifier = modifier };
+                       return new HotKey { Key = (int) Gdk.Keyval.ToLower (evt.KeyValue),
+                               Modifier = modifier };
                }
 
                public static HotKey ParseName (string name)
diff --git a/LongoMatch.Core/Store/HotKey.cs b/LongoMatch.Core/Store/HotKey.cs
index 5272f7b..3f3715a 100644
--- a/LongoMatch.Core/Store/HotKey.cs
+++ b/LongoMatch.Core/Store/HotKey.cs
@@ -66,7 +66,7 @@ namespace LongoMatch.Core.Store
                [JsonIgnore]
                public Boolean Defined {
                        get {
-                               return (Key != -1 && Modifier != -1);
+                               return (Key != -1 || Modifier != -1);
                        }
                }
                #endregion


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]