コード例 #1
0
ファイル: PS2Mouse.cs プロジェクト: TheRealEli310/WinCosmos
        /// <summary>
        /// Tries to enable the scroll wheel.
        /// </summary>
        /// <returns>Returns the mouse id.</returns>
        private byte TryToEnableScrollWheel()
        {
            SendCommand(Command.SetSampleRate, 200);
            SendCommand(Command.SetSampleRate, 100);
            SendCommand(Command.SetSampleRate, 80);

            SendCommand(Command.GetMouseID);

            return(mPS2Controller.ReadByteAfterAck());
        }
コード例 #2
0
 /// <summary>
 /// Gets the current keyboard scan code set.
 /// </summary>
 /// <returns>Returns the current scan code set.</returns>
 private byte GetScanCodeSet()
 {
     SendCommand(Command.GetOrSetScanCodeSet, 0);
     return(mPS2Controller.ReadByteAfterAck());
 }