lib/ps4socket.js
function(packet) {
        packet._index = 8;
        packet.preEditIndex = packet.readInt();
        packet.preEditLength = packet.readInt();
        // TODO: see above about how how we're skipping
        // 16 bytes here for some reason and how hacky
        // this is
        if (packet.buf.length > 36) {
            packet._index += 16;
            packet.editIndex = packet.readInt();
            packet.editLength = packet.readInt();
            packet.caretIndex = packet.readInt();
            packet.string = packet.readString(packet._index);
        }
        this.emit('osk_string_changed', packet);
    }
function(packet) {
        packet._index = 8;
        packet.preEditIndex = packet.readInt();
        packet.preEditLength = packet.readInt();
        // TODO: see above about how how we're skipping
        // 16 bytes here for some reason and how hacky
        // this is
        if (packet.buf.length > 36) {
            packet._index += 16;
            packet.editIndex = packet.readInt();
            packet.editLength = packet.readInt();
            packet.caretIndex = packet.readInt();
            packet.string = packet.readString(packet._index);
        }
        this.emit('osk_string_changed', packet);
    }
function ( packet ) { packet . _index = 8 ; packet . preEditIndex = packet . readInt ( ) ; packet . preEditLength = packet . readInt ( ) ; // TODO: see above about how how we're skipping // 16 bytes here for some reason and how hacky // this is if ( packet . buf . length > 36 ) { packet . _index += 16 ; packet . editIndex = packet . readInt ( ) ; packet . editLength = packet . readInt ( ) ; packet . caretIndex = packet . readInt ( ) ; packet . string = packet . readString ( packet . _index ) ; } this . emit ( 'osk_string_changed' , packet ) ; }
osk string changed
osk string changed