Ejemplo n.º 1
0
        public VKey(Keys virtualKey)
        {
            VirtualKey = virtualKey;

            try
            {
                LowKey = User32Interop.ToUnicode(virtualKey, Keys.None);
            }
            catch (Exception) { LowKey = " "; }

            try
            {
                UpKey = User32Interop.ToUnicode(virtualKey, Keys.ShiftKey);
            }
            catch (Exception) { UpKey = " "; }
        }
Ejemplo n.º 2
0
        public VKey(Keys virtualKey)
        {
            VirtualKey = virtualKey;

            try
            {
                LowKey = User32Interop.ToAscii(virtualKey, Keys.None).ToString();
            }
            catch (Exception) { LowKey = " "; }

            try
            {
                UpKey = User32Interop.ToAscii(virtualKey, Keys.ShiftKey).ToString();
            }
            catch (Exception) { UpKey = " "; }
        }