Move cursor to left, or -1 from selection.

Script key: Move cursor to left, or -1 from selection.

Posted by shirose_jp

Install

Details

Label
Voice Over Move cursor to left, or -1 from selection.
Script
// Move cursor to left, or -1 from selection.
// カーソルを左へ移動(選択範囲を1減)

var range = getSelectedRange();

if ( isSelect() === true ) {
  setSelectedRange( range[0], range[1] - 1 );
} else {
  setSelectedRange( range[0] - 1, 0 );
}

function isSelect() {
  if ( getSelectedText().length > 0 ) {
    return true;
  } else {
    return false;
  }
}

Advanced

Keyboard shortcut None
Hide key Yes

Discussion

comments powered by Disqus