1 // ==========================================================================
  2 // Project:   SproutCore - JavaScript Application Framework
  3 // Copyright: ©2006-2011 Strobe Inc. and contributors.
  4 //            Portions ©2008-2011 Apple Inc. All rights reserved.
  5 // License:   Licensed under MIT license (see license.js)
  6 // ==========================================================================
  7 
  8 
  9 // Key Bindings are used to map a keyboard input to an action message on a
 10 // responder.  These bindings are most useful when implementing sophisticated
 11 // keyboard input mechanisms.  For keyboard shortcuts, instead use menus, etc.
 12 
 13 SC.MODIFIED_KEY_BINDINGS = {
 14   'ctrl_.': 'cancel',
 15   'shift_tab': 'insertBacktab',
 16   'shift_left': 'moveLeftAndModifySelection',
 17   'shift_right': 'moveRightAndModifySelection',
 18   'shift_up': 'moveUpAndModifySelection',
 19   'shift_down': 'moveDownAndModifySelection',
 20   'alt_left': 'moveLeftAndModifySelection',
 21   'alt_right': 'moveRightAndModifySelection',
 22   'alt_up': 'moveUpAndModifySelection',
 23   'alt_down': 'moveDownAndModifySelection',
 24   'ctrl_a': 'selectAll'
 25 } ;
 26 
 27 SC.BASE_KEY_BINDINGS = {
 28   'escape': 'cancel',
 29   'backspace': 'deleteBackward',
 30   'delete': 'deleteForward',
 31   'return': 'insertNewline',
 32   'tab': 'insertTab',
 33   'left': 'moveLeft',
 34   'right': 'moveRight',
 35   'up': 'moveUp',
 36   'down': 'moveDown',
 37   'home': 'moveToBeginningOfDocument',
 38   'end': 'moveToEndOfDocument',
 39   'pagedown': 'pageDown',
 40   'pageup': 'pageUp'
 41 } ;
 42 
 43