Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #region Key_IsDown
- private static void GetMemoryR(uint Address, ref byte[] Bytes)
- {
- PS3.GetMemory(Address, Bytes);
- }
- public static string Key_IsDown()
- {
- uint Key_isDown = 0x013793cd;
- byte[] Key = new byte[3];
- GetMemoryR(Key_isDown, ref Key);
- string mystring = null;
- mystring = BitConverter.ToString(Key);
- string result = mystring.Replace("-", "");
- string result1 = result.Replace(" ", "");
- string key = result1;
- string KeyPressed = "";
- if (((key == "000030")|| (key == "000230")) || (key == "000130"))
- {
- KeyPressed = "[ ]";
- }
- else if (key == "000400")
- {
- KeyPressed = "X";
- }
- else if (((key == "002002") || (key == "002202")) || (key == "002102"))
- {
- KeyPressed = "L3";
- }
- else if (((key == "000004") || (key == "000204")) || (key == "000104"))
- {
- KeyPressed = "R3";
- }
- else if (((key == "080800") || (key == "080A00")) || (key == "080900"))
- {
- KeyPressed = "L1";
- }
- else if (((key == "000101") || (key == "000201")) || (key == "000001"))
- {
- KeyPressed = "R1";
- }
- else if (((key == "004000") || (key == "004200")) || (key == "004100"))
- {
- KeyPressed = "R2";
- }
- else if (((key == "008100") || (key == "008200")) || (key == "008000"))
- {
- KeyPressed = "L2";
- }
- else if (((key == "002006") || (key == "002206")) || (key == "002106"))
- {
- KeyPressed = "L3 + R3";
- }
- else
- {
- KeyPressed = key;
- }
- return KeyPressed;
- }
- //Exmple:
- //Use Timer/Thread/backgroundWorker or whatever you want, aslong that is run like a timer.
- public void Test()
- {
- if (Key_IsDown() == "X")
- {
- MessageBox.Show("The button X Have been pressed", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
- //When you will press the button "X" you will get this messageBox pop up.
- }
- }
- #endregion
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement