diff --git a/configuration.json b/configuration.json index 37d00845c8f6fdf995d5f2f82127f2e24e6e2b07..f9820f3195a7507615da283d04997eeebd891ecb 100644 --- a/configuration.json +++ b/configuration.json @@ -35,7 +35,7 @@ "0" ], "button8": [ - "i", + "W", "70", "0" ], @@ -129,9 +129,19 @@ "60", "60" ], - "button0": [ - " ", + "button27": [ + "#", "70", "60" + ], + "button28": [ + "@", + "80", + "60" + ], + "button29": [ + "*", + "90", + "60" ] } \ No newline at end of file diff --git a/public/client.html b/public/client.html index 2427bf1b02aaec5860448978f59cad8a641b3985..56f7f071fd3e0303546b0c506242d18b3d76bc56 100755 --- a/public/client.html +++ b/public/client.html @@ -58,10 +58,10 @@ </div> </header> <div class="wrapper"> - <div class = "keyboard" id="keyboard"> - </div> <div class="touchpad" id="touchpad"> </div> + <div class = "keyboard" id="keyboard"> + </div> </div> <!-- The Modal --> diff --git a/public/js/client.js b/public/js/client.js index eaeb4c7b798810680ac0e1d0bf3952d5ca1789d0..ec2c6980da73fa624acc75ca5cacf3ae75711b26 100755 --- a/public/js/client.js +++ b/public/js/client.js @@ -11,7 +11,7 @@ var modal = document.getElementById('myModal');// Modal textbox var inputModal = document.getElementById('inputText'); var keyboardWidth = document.getElementById('keyboard').offsetWidth;// Width pixel of display var keyboardHeight = document.getElementById('keyboard').offsetHeight;// Height pixel of -$("#touchpad").hide(); +//$("#touchpad").hide(); /* -----------KEYBOARD CONTROLS--------------- diff --git a/public/style/main.css b/public/style/main.css index 390bf1348bd69c26d729b432df720634c6c1a056..21c98fc084e8641c6792f2d0eed711daa2bbab57 100755 --- a/public/style/main.css +++ b/public/style/main.css @@ -28,6 +28,8 @@ body { margin-top: 3%; border-radius: 2em; padding: 4%; + font-size: 19px; + text-align: center; /*Button Coloring*/ diff --git a/public/style/style.js b/public/style/style.js index 120ca8184d36e110c86dce1382bf482ebaef96cf..70e7b4532b3c6327d56b302f230efe17e874f45d 100644 --- a/public/style/style.js +++ b/public/style/style.js @@ -3,7 +3,7 @@ document.body.onload = addKeyboard; function addKeyboard () { - var keys = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']; + var keys = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','#','@','*']; for (var i = 0; i < keys.length; i++) { // create a new div element diff --git a/server.js b/server.js index 5949d9877a957342e19464bf061aae61c341ee61..ed27b0e86e58e8d7f17bae65f812d09224ab216d 100755 --- a/server.js +++ b/server.js @@ -78,7 +78,19 @@ io.on('connection', function(socket) { socket.emit('updateKeys', {k: keys, x: xpos, y: ypos}); socket.on('string', function(str) { console.log("Trying to type") - robot.typeString(str) + console.log(str); + if (str === "@"){ + robot.keyTap('enter'); + } + else if (str === "#"){ + robot.keyTap('space'); + } + else if (str === '*'){ + robot.keyTap('backspace'); + } + else{ + robot.typeString(str) + } }); socket.on('saveKey', function(key) {