diff --git a/README.md b/README.md index d062256..7c3dd5a 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ Remote Mouse is a flask + pyautogui app to control a PC from your phone or any other device. # Fixes -* Fixed scroll direction detection. -* Fixed right click detection on release. +* Added delete button. +* Disabled touch zoom-in. # Notes * Need python 2+ diff --git a/src/core/routes/Routes.py b/src/core/routes/Routes.py index e0fe225..d92aa9d 100644 --- a/src/core/routes/Routes.py +++ b/src/core/routes/Routes.py @@ -1,4 +1,5 @@ # Python imports +import subprocess # Lib imports import pyautogui @@ -30,6 +31,26 @@ def home(): message='Must use GET request type...') +@app.route('/sound-manager') +def soundManager(): + if request.method == 'GET': + # command = 'runuser -l abaddon bash -c "pacmd list-sink-inputs"' + command = 'sudo -u abaddon bash -c "pacmd list-sink-inputs"' + # command = 'sudo -u abaddon bash </') def updateCoords2(x, y): try: diff --git a/src/core/routes/Sockets.py b/src/core/routes/Sockets.py index 595a252..14a32a5 100644 --- a/src/core/routes/Sockets.py +++ b/src/core/routes/Sockets.py @@ -63,6 +63,12 @@ def pressEnter(eve = None): pyautogui.press("enter") return "" +@app.route('/press-back') +@socketio.on('press_back') +def pressBack(eve = None): + pyautogui.press("backspace") + return "" + @socketio.on('update_coords') def updateCoords(message): diff --git a/src/core/static/js/events.js b/src/core/static/js/events.js index ece3cc4..c87c5ea 100644 --- a/src/core/static/js/events.js +++ b/src/core/static/js/events.js @@ -142,6 +142,11 @@ function pressEnter() { socket.emit('press_enter', ""); } +function pressBack() { + socket.emit('press_back', ""); +} + + function scrollToggle() { if (isScrolling) { isScrolling = false; @@ -190,12 +195,12 @@ $( "#typingModalBtn" ).bind( "mouseup", async function(eve) { $( "#closeControlsModalBtn" ).bind( "mouseup", async function(eve) { console.log("here"); - $('#controlsModal').modal({"focus": false, "show": false}); + $('#controlsModal').modal('hide'); }); $( "#closeTypingModalBtn" ).bind( "mouseup", async function(eve) { console.log("here2"); - $('#typingModal').modal({"focus": false, "show": false}); + $('#typingModal').modal('hide'); }); @@ -209,6 +214,8 @@ document.addEventListener("touchcancel", touchHandler, true); document.getElementById("rightClickBtn").addEventListener("mouseup", rightClick, true); document.getElementById("sendKeysBtn").addEventListener("mouseup", sendKeys, true); document.getElementById("pressEnterBtn").addEventListener("mouseup", pressEnter, true); +document.getElementById("pressBackBtn").addEventListener("mouseup", pressBack, true); + document.getElementById("scrollToggle").addEventListener("mouseup", scrollToggle, true); document.getElementById("mouseHoldToggle").addEventListener("mouseup", holdToggle, true); diff --git a/src/core/templates/index.html b/src/core/templates/index.html index e97322e..ee59395 100644 --- a/src/core/templates/index.html +++ b/src/core/templates/index.html @@ -31,6 +31,9 @@
  • +
  • + +
  • @@ -67,6 +70,12 @@