Esempio n. 1
0
        public static string ReadKey()
        {
            if (cKeyboard == null)
            {
                cKeyboard = new Cosmos.HAL.PS2Keyboard();
            }

            var k       = cKeyboard.ReadKey();
            var Key     = k.Key;
            var Control = k.Modifiers.HasFlag(ConsoleModifiers.Control);
            var Alt     = k.Modifiers.HasFlag(ConsoleModifiers.Alt);
            var Shift   = k.Modifiers.HasFlag(ConsoleModifiers.Shift);

            return(Key + ";" + Control + ";" + Alt + ";" + "Shift");
        }
Esempio n. 2
0
 public static void Start()
 {
     Console.WriteLine("Starting keyboard on ring SYSTEM...");
     kbInstance = new Cosmos.HAL.PS2Keyboard();
 }