⌃A
Move to beginning of line, or expand selection to beginning of line.

Script key: Move to beginning of line, or expand selection to beginning of line.

Posted by shirose_jp

Install

Details

Label ⌃A
Voice Over Move to beginning of line, or expand selection to beginning of line.
Script
// Move to beginning of line, or expand selection to beginning of line.
// カーソルを行頭へ移動(行頭まで選択)

var range = getSelectedRange();
var line_range = getSelectedLineRange();

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

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

Advanced

Keyboard shortcut None
Hide key Yes

Discussion

comments powered by Disqus