G2A Many GEOs
SHARE
TWEET

Untitled

a guest Nov 9th, 2016 119 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @@resource KeyEventTranslations
  2. (* Modifiers can be "Shift", "Control", "Command", "Option"
  3.     For Macintosh: "Command" = Command Key, "Option" = Option Key
  4.     For X11: "Command" = Mod1, "Option" = Mod2
  5.     For Windows: "Command" = Alt, "Option" = Alt
  6. *)
  7.  
  8.      
  9. EventTranslations[{
  10.  
  11. (* Evaluation *)
  12.     Item[KeyEvent["Enter"], "EvaluateCells"],
  13.     Item[KeyEvent["KeypadEnter"], "EvaluateCells"],
  14.     Item[KeyEvent["Return", Modifiers -> {Shift}], "HandleShiftReturn"],
  15.     Item[KeyEvent["KeypadEnter", Modifiers -> {Shift}], "EvaluateNextCell"],    
  16.     Item[KeyEvent["Enter", Modifiers -> {Shift}], "EvaluateNextCell"],
  17.     Item[KeyEvent["Return", Modifiers -> {Shift, Control}], Evaluate[All]],
  18.     Item[KeyEvent["Return", Modifiers -> {Option}], "SimilarCellBelow"],
  19.     Item[KeyEvent[",", Modifiers->{Command}], FrontEnd`EvaluatorInterrupt[Automatic]],
  20.     Item[KeyEvent["Escape"], "ShortNameDelimiter"],
  21.  
  22. (* Cursor control *)
  23.     Item[KeyEvent["Up"], "MovePreviousLine"],
  24.     Item[KeyEvent["Down"], "MoveNextLine"],
  25.     Item[KeyEvent["Left"], "MovePrevious"],
  26.     Item[KeyEvent["Right"], "MoveNext"],
  27.     Item[KeyEvent["Right", Modifiers -> {Control}], "MoveNextWord"],
  28.     Item[KeyEvent["Left", Modifiers -> {Control}], "MovePreviousWord"],
  29.     Item[KeyEvent["End"], "MoveLineEnd"],
  30.     Item[KeyEvent["Home"], "MoveLineBeginning"],
  31.  
  32. (* Selection *)
  33.     Item[KeyEvent["Right", Modifiers -> {Shift}], "SelectNext"],
  34.     Item[KeyEvent["Left", Modifiers -> {Shift}], "SelectPrevious"],
  35.     Item[KeyEvent["Right", Modifiers -> {Control, Shift}], "SelectNextWord"],
  36.     Item[KeyEvent["Left", Modifiers -> {Control, Shift}], "SelectPreviousWord"],
  37.     Item[KeyEvent["Down", Modifiers -> {Shift}], "SelectNextLine"],
  38.     Item[KeyEvent["Up", Modifiers -> {Shift}], "SelectPreviousLine"],
  39.     Item[KeyEvent["Home", Modifiers -> {Shift}], "SelectLineBeginning"],
  40.     Item[KeyEvent["End", Modifiers -> {Shift}], "SelectLineEnd"],
  41.     Item[KeyEvent[".", Modifiers -> {Control}], "ExpandSelection"],
  42.     Item[KeyEvent["KeypadDecimal", Modifiers -> {Control}], "ExpandSelection"],
  43.  
  44. (* Notebook window control *)
  45.     Item[KeyEvent["Up", Modifiers -> {Control}], "ScrollLineUp"],
  46.     Item[KeyEvent["Down", Modifiers -> {Control}], "ScrollLineDown"],
  47.     Item[KeyEvent["PageUp"], "ScrollPageUp"],
  48.     Item[KeyEvent["PageDown"], "ScrollPageDown"],
  49.     Item[KeyEvent["Prior"], "ScrollPageUp"],
  50.     Item[KeyEvent["Next"], "ScrollPageDown"],
  51.     Item[KeyEvent["Home", Modifiers -> {Control}],
  52.         FrontEndExecute[{
  53.             FrontEnd`SelectionMove[FrontEnd`InputNotebook[], Before, Notebook],
  54.             FrontEnd`FrontEndToken[FrontEnd`InputNotebook[], "ScrollNotebookStart"]
  55.         }]],
  56.     Item[KeyEvent["End", Modifiers -> {Control}],
  57.         FrontEndExecute[{
  58.             FrontEnd`SelectionMove[FrontEnd`InputNotebook[], After, Notebook],
  59.             FrontEnd`FrontEndToken[FrontEnd`InputNotebook[], "ScrollNotebookEnd"]
  60.         }]],
  61.     Item[KeyEvent["Left", Modifiers->{Command}], "HyperlinkGoBack"],
  62.     Item[KeyEvent["Right", Modifiers->{Command}], "HyperlinkGoForward"],
  63.  
  64. (* Input *)
  65.     Item[KeyEvent["Return"], "Linebreak"],
  66.     Item[KeyEvent["Tab"], "Tab"],
  67.     Item[KeyEvent["Backspace"], "DeletePrevious"],
  68.     Item[KeyEvent["Delete"], "DeleteNext"],
  69.     Item[KeyEvent["Backspace", Modifiers->{Control}], "DeletePreviousWord"],
  70.     Item[KeyEvent["Delete", Modifiers->{Control}], "DeleteNextWord"],
  71.  
  72. (* Typesetting input *)
  73.     Item[KeyEvent["6", Modifiers -> {Control}], "Superscript"],
  74.     Item[KeyEvent["Keypad6", Modifiers -> {Control}], "Superscript"],
  75.     Item[KeyEvent["^", Modifiers -> {Control}], "Superscript"],
  76.     Item[KeyEvent["-", Modifiers -> {Control}], "Subscript"],
  77.     Item[KeyEvent["KeypadSubtract", Modifiers -> {Control}], "Subscript"],
  78.     Item[KeyEvent["_", Modifiers ->{Control}],  "Subscript"],
  79.     Item[KeyEvent["/", Modifiers -> {Control}], "Fraction"],
  80.     Item[KeyEvent["KeypadDivide", Modifiers -> {Control}], "Fraction"],
  81.     Item[KeyEvent["2", Modifiers -> {Control}], "Radical"],
  82.     Item[KeyEvent["Keypad2", Modifiers -> {Control}], "Radical"],
  83.     Item[KeyEvent["@", Modifiers -> {Control}], "Radical"],
  84.     Item[KeyEvent["7", Modifiers -> {Control}], "Above"],
  85.     Item[KeyEvent["&", Modifiers -> {Control}], "Above"],
  86.     Item[KeyEvent["Keypad7", Modifiers -> {Control}], "Above"],
  87.     Item[KeyEvent["$", Modifiers -> {Control}], "Below"],
  88.     Item[KeyEvent["4", Modifiers -> {Control}], "Below"],
  89.     Item[KeyEvent["Keypad4", Modifiers -> {Control}], "Below"],
  90.     Item[KeyEvent[",", Modifiers -> {Control}], "NewColumn"],
  91.     Item[KeyEvent["Return", Modifiers -> {Control}], "NewRow"],
  92.     Item[KeyEvent["9", Modifiers -> {Control}], "CreateInlineCell"],
  93.     Item[KeyEvent["(", Modifiers -> {Control}], "CreateInlineCell"],
  94.     Item[KeyEvent["Keypad9", Modifiers -> {Control}], "CreateInlineCell"],
  95.     Item[KeyEvent[")", Modifiers -> {Control}], "MoveNextCell"],
  96.     Item[KeyEvent["0", Modifiers -> {Control}], "MoveNextCell"],
  97.     Item[KeyEvent["Keypad0", Modifiers -> {Control}], "MoveNextCell"],
  98.     Item[KeyEvent["5", Modifiers -> {Control}, CellClass -> BoxFormData], "Otherscript"],
  99.     Item[KeyEvent["Keypad5", Modifiers -> {Control}, CellClass -> BoxFormData], "Otherscript"],
  100.     Item[KeyEvent["%", Modifiers -> {Control}, CellClass -> BoxFormData], "Otherscript"],
  101.     Item[KeyEvent["Left", Modifiers->{Command}, CellClass -> BoxFormData], "NudgeLeft"],
  102.     Item[KeyEvent["Right", Modifiers->{Command}, CellClass -> BoxFormData], "NudgeRight"],
  103.     Item[KeyEvent["PageUp", Modifiers-> {Control}, CellClass -> BoxFormData], "PreviousFunctionTemplate"],
  104.     Item[KeyEvent["PageDown", Modifiers-> {Control}, CellClass -> BoxFormData], "NextFunctionTemplate"],
  105.  
  106. (* Typesetting motion commands *)
  107.     Item[KeyEvent[" ", Modifiers -> {Control}], "MoveExpressionEnd"],
  108.     Item[KeyEvent["Tab", Modifiers -> {Shift}], "MovePreviousPlaceHolder"],
  109.     Item[KeyEvent["Tab", Modifiers -> {Control}, CellClass -> BoxFormData], "MoveNextExpression"],
  110.     Item[KeyEvent["Tab", Modifiers -> {Control, Shift}, CellClass -> BoxFormData], "MovePreviousExpression"],
  111.    
  112. (* Drawing tool commands *)
  113.     Item[KeyEvent["o", CellClass->BoxFormData, BoxClass->GraphEdit2D], FrontEndExecute[Select2DTool["Select"]]],
  114.     (* Reassigned to Rectangle in v8; I doubt anyone knows "r" does anything.  Double-click is easier. *)
  115.     (* Item[KeyEvent["r", CellClass->BoxFormData, BoxClass->GraphEdit2D], FrontEndExecute[Select2DTool["Reshape"]]],*)
  116.     Item[KeyEvent["p", CellClass->BoxFormData, BoxClass->GraphEdit2D], FrontEndExecute[Select2DTool["DrawPoint"]]],
  117.     Item[KeyEvent["c", CellClass->BoxFormData, BoxClass->GraphEdit2D], FrontEndExecute[Select2DTool["DrawCircle"]]],
  118.     Item[KeyEvent["d", CellClass->BoxFormData, BoxClass->GraphEdit2D], FrontEndExecute[Select2DTool["DrawDisk"]]],
  119.     Item[KeyEvent["f", CellClass->BoxFormData, BoxClass->GraphEdit2D], FrontEndExecute[Select2DTool["DrawFreehand"]]],
  120.     Item[KeyEvent["a", CellClass->BoxFormData, BoxClass->GraphEdit2D], FrontEndExecute[Select2DTool["DrawArrow"]]],
  121.     Item[KeyEvent["l", CellClass->BoxFormData, BoxClass->GraphEdit2D], FrontEndExecute[Select2DTool["DrawLine"]]],
  122.     Item[KeyEvent["b", CellClass->BoxFormData, BoxClass->GraphEdit2D], FrontEndExecute[Select2DTool["DrawBox"]]],
  123.     (* "q" for Rectangle deprecated in v8 but preserved for "backward compatibilty" for one version *)
  124.     Item[KeyEvent["q", CellClass->BoxFormData, BoxClass->GraphEdit2D], FrontEndExecute[Select2DTool["DrawRectangle"]]],
  125.     Item[KeyEvent["r", CellClass->BoxFormData, BoxClass->GraphEdit2D], FrontEndExecute[Select2DTool["DrawRectangle"]]],
  126.     Item[KeyEvent["s", CellClass->BoxFormData, BoxClass->GraphEdit2D], FrontEndExecute[Select2DTool["DrawPolyline"]]],
  127.     Item[KeyEvent["g", CellClass->BoxFormData, BoxClass->GraphEdit2D], FrontEndExecute[Select2DTool["DrawPolygon"]]],
  128.     Item[KeyEvent["t", CellClass->BoxFormData, BoxClass->GraphEdit2D], FrontEndExecute[Select2DTool["PlaceText"]]],
  129.     Item[KeyEvent["m", CellClass->BoxFormData, BoxClass->GraphEdit2D], FrontEndExecute[Select2DTool["PlaceMath"]]],
  130.     Item[KeyEvent["i", CellClass->BoxFormData, BoxClass->GraphEdit2D], FrontEndExecute[Select2DTool["SampleColor"]]],
  131.     Item[KeyEvent[".", CellClass->BoxFormData, BoxClass->GraphEdit2D], FrontEndExecute[Select2DTool["GetCoordinates"]]],
  132.     Item[KeyEvent["e", CellClass->BoxFormData, BoxClass->GraphEdit2D], FrontEndExecute[Select2DTool["SampleStyle"]]],
  133.     Item[KeyEvent["o", CellClass->BoxFormData, BoxClass->GraphEdit3D], FrontEndExecute[Select3DTool["Select"]]],
  134.     Item[KeyEvent["i", CellClass->BoxFormData, BoxClass->GraphEdit3D], FrontEndExecute[Select3DTool["SampleColor"]]],
  135.     Item[KeyEvent["v", CellClass->BoxFormData, BoxClass->GraphEdit3D], FrontEndExecute[Select3DTool["AdjustView"]]],
  136.     Item[KeyEvent["m", CellClass->BoxFormData, BoxClass->GraphEdit3D], FrontEndExecute[Select3DTool["AdjustLights"]]],
  137.  
  138. (* Grouping commands *)
  139.     Item[KeyEvent["g", Modifiers -> {Control, Shift}], "CellGroup"],
  140.     Item[KeyEvent["u", Modifiers -> {Control, Shift}], "CellUngroup"],
  141.     Item[KeyEvent["g", Modifiers -> {Control, Shift}, CellClass->BoxFormData, BoxClass->GraphEdit2D], "Group"],
  142.     Item[KeyEvent["u", Modifiers -> {Control, Shift}, CellClass->BoxFormData, BoxClass->GraphEdit2D], "Ungroup"],
  143.  
  144. (* Miscellaneous menu commands *)
  145.     Item[KeyEvent["Cut"], "Cut"],
  146.     Item[KeyEvent["Copy"], "Copy"],
  147.     Item[KeyEvent["Paste"], Paste[After]],
  148.     Item[KeyEvent["Undo"], "Undo"],
  149.     Item[KeyEvent["Redo"], "Redo"],
  150.     Item[KeyEvent["z", Modifiers -> {Control, Shift}], "Redo"],
  151.     Item[KeyEvent["Help"], "SelectionHelpDialog"],
  152.     Item[KeyEvent["Insert", Modifiers -> {Shift}], Paste[After]],
  153.     Item[KeyEvent["Insert", Modifiers -> {Control}], "Copy"],
  154.     Item[KeyEvent["Delete", Modifiers -> {Shift}], "Cut"],
  155.     Item[KeyEvent["F1", Modifiers->{Shift}], SelectionHelpDialog[False]],
  156.     Item[KeyEvent["F2"], FrontEnd`CompleteSelection[True]]
  157.  
  158. Item[KeyEvent["m", Modifiers -> {Control, Shift}],
  159.      FrontEnd`FrontEndExecute[{
  160.         FrontEnd`FrontEndToken["EvaluateNotebook"]
  161.      }]]
  162.      
  163. Item[KeyEvent["w", Modifiers -> {Control, Shift}],
  164.       FrontEnd`FrontEndExecute[{
  165.          FrontEnd`FrontEndToken["SelectGeneratedCells"],
  166.          FrontEnd`FrontEndToken["Clear"]
  167.      }]]
  168. Item[KeyEvent["j", Modifiers -> {Control, Shift}],
  169.       KernelExecute[Remove["Global`*"]],
  170.       MenuEvaluator -> Automatic
  171.      ]
  172.      
  173. Item[KeyEvent["x", Modifiers -> {Control, Shift}],
  174.      FrontEnd`FrontEndExecute[{
  175.         FrontEnd`SelectionMove[FrontEnd`InputNotebook[], All, Cell],
  176.         FrontEnd`FrontEndToken["Clear"]
  177.     }]]
  178. }]
RAW Paste Data
Ledger Nano X - The secure hardware wallet
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top