source/lib/VBConnPanel.js
// or inserting at the current caret position if no text highlighted

or inserting at the current caret position if no text highlighted
or inserting at the current caret position if no text highlighted
insertShortcutText(shortcutText) {
    const oldText   = this.deviceInputText.value
    const selStart  = this.deviceInputText.selectionStart
    const selEnd    = this.deviceInputText.selectionEnd
    const preText   = oldText.substring(0, selStart)
    const postText  = oldText.substring(selEnd)
    this.deviceInputText.value          = preText + shortcutText + postText
    this.deviceInputText.selectionStart = selStart + shortcutText.length
    this.deviceInputText.selectionEnd   = this.deviceInputText.selectionStart
  }
insertShortcutText ( shortcutText ) { const oldText = this . deviceInputText . value const selStart = this . deviceInputText . selectionStart const selEnd = this . deviceInputText . selectionEnd const preText = oldText . substring ( 0 , selStart ) const postText = oldText . substring ( selEnd ) this . deviceInputText . value = preText + shortcutText + postText this . deviceInputText . selectionStart = selStart + shortcutText . length this . deviceInputText . selectionEnd = this . deviceInputText . selectionStart }
or inserting at the current caret position if no text highlighted
or inserting at the current caret position if no text highlighted