@@ -17,7 +17,7 @@ ISOTerminal.prototype.enableRemoteKeyboard = function(opts){
1717 this . send ( clearScreen ) ;
1818 this . send ( `\n\rfor instructions\n\rsee ${ document . location . origin } /index.html#Remote%20keyboard\n\n\r` )
1919 this . send ( "enter 'm' for mainmenu\n\n\r" )
20- this . send ( "[36mkeyboard ip-adress > [0m" )
20+ this . send ( "[36mkeyboard ip-address > [0m" )
2121 // autofill ip
2222 if ( service . ip ) {
2323 for ( let i = 0 ; i < service . ip . length ; i ++ ) this . send ( service . ip . charAt ( i ) )
@@ -26,11 +26,12 @@ ISOTerminal.prototype.enableRemoteKeyboard = function(opts){
2626 } ,
2727 server : ( term ) => {
2828 try {
29- service . addr = `ws ://${ service . ip } :9090/` ;
29+ service . addr = `wss ://${ service . ip } :9090/` ;
3030 service . ws = new WebSocket ( service . addr )
31- service . ws . addEventListener ( "open" , ( ) => {
31+ service . ws . addEventListener ( "error" , console . error )
32+ service . ws . addEventListener ( "open" , ( e ) => {
3233 if ( service . state == 'listening' ) {
33- this . send ( `\n\rconnected to ${ service . addr } ! \\o/\n\r` )
34+ this . send ( `\n\rconnected! \\o/\n\r` )
3435 this . bootMenu ( )
3536 }
3637 service . state = 'receiving'
@@ -76,9 +77,9 @@ ISOTerminal.prototype.enableRemoteKeyboard = function(opts){
7677 this . send ( "\n\r" )
7778 this . bootMenu ( )
7879 } else if ( ch == '\n' || ch == '\r' ) {
79- this . send ( "\n\rwaiting for connection.." )
8080 service . server ( this )
8181 service . state = 'listening'
82+ this . send ( "\n\rconnecting to " + service . addr )
8283 } else {
8384 service . ip = ch == '\b' ? service . ip . substr ( 0 , this . service . ip . length - 1 )
8485 : service . ip + ch
0 commit comments