コード例 #1
0
        public static KeyInfo DecoderFallback(byte b)
        {
            switch (b)
            {
            case 9:
                return(KeyInfo.Make(SpecialKey.Tab));

            case 127:
                return(KeyInfo.Make(SpecialKey.Backspace));

            case 13:
                return(KeyInfo.Make(SpecialKey.Enter));

            default:
                //otherwise it's a normal char
                return(KeyInfo.Make((char)b));
            }
        }