Advertisement
Mango_Knife

[C#]Mw3 - Keyboard-Is-Open Function

Jun 25th, 2014
573
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.18 KB | None | 0 0
  1. Well, i didnt saw it released and its very helpfull method
  2. Baisicly, it can detect when the keyboard is open or close
  3.  
  4. So if you coding a mod menu you could do like If keyboard is open, then stop the timer, then when u using dpad or buttons on the keyboard, it will not scroll trough the options on the mod menu
  5.  
  6. So here it is (Add it into a timer):
  7. C#:
  8. Code:
  9.             public static Boolean KeyBoardisOpen()
  10.             {
  11.                 if (PS3.Extension.ReadByte(0x73145F) == 0x1)
  12.                 {
  13.                     return true;
  14.                 }
  15.                 else
  16.                 {
  17.                     return false;
  18.                 }
  19.             }
  20. VB.NET:
  21. Code:
  22.     Public Shared Function KeyBoardisOpen() As Boolean
  23.         If (PS3.Extension.ReadByte(&H73145F) = &H1) Then
  24.             Return True
  25.         Else
  26.             Return False
  27.         End If
  28.     End Function
  29.  
  30. Then add this to a timer/thread or whatever:
  31. Code:
  32.                 if (KeyBoardisOpen() == true)
  33.                 {      
  34.                      Timer1.Stop()
  35.                 }
  36.                 else
  37.                 {  
  38.                      Timer1.Start()
  39.                 }
  40.  
  41. Hope it helped :)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement