You are reading a single comment by @allObjects and its replies. Click here to read the full conversation.
  • ...sorry, could not let 'it' go before 'really' useable. I introduce(d) the single tilde (~) as shift-in/out char for special, non char-keys... and I have now to escape it as well: double-tilde (~~) means 'send one single tilde' (~). This gives you everything you need to hit all keys defined in Espruino ble_hid_keyboard - http://www.espruino.com/modules/ble_hid_­keyboard.js - module defined in KEY as .KEY[<key>]. The modifiers are now on you... ;-) . Here we go with modified ._send(c):

    , _send: function(c) {
        if (c == "~") {
          var sOP = this.string.indexOf("~",1); // shiftOutPos
          if (sOP < 0) { throw "Unmatched tilde (~) around ..." 
                               +this.string.substring(0,5); }
          if (sOP > 1) { c = this.string.substring(1,sOP); }
          this.string = this.string.substring(sOP); }
        kb.tap(kb.KEY[c],0,this._sent.bind(this)­);
      }
    
About

Avatar for allObjects @allObjects started