Exemple #1
0
        public KeyScanCode?GetScanCode(int fromValue, Key untranslatedCode)
        {
            KeyScanCode result;

            // This value shows up for both Return and Minus, so use the
            // untranslated code.
            if (ScanCodesToIgnore.TryGetValue(untranslatedCode, out result))
            {
                return(result);
            }
            if (fromValue == 0)
            {
                return(UntranslatedScanCode.TryGetValue(untranslatedCode, out result) ? (KeyScanCode?)result : null);
            }
            return(ToScanCode.TryGetValue(fromValue, out result) ? (KeyScanCode?)result : null);
        }
        public KeyScanCode?GetScanCode(int fromValue)
        {
            KeyScanCode result;

            return(ToScanCode.TryGetValue(fromValue, out result) ? (KeyScanCode?)result : null);
        }