Scripting Editor CommandsCognex VisionPro

You can use the following keyboard shortcuts in the VisionPro scripting editor. Most shortcuts use a single key with the Shift, Alt, or Control key modifiers. Some shortcuts require multiple keystrokes, for example: Control + K followed by Control + C.

Standard Keys

These are the standard keys that work in most Windows applications.

Table 1. Standard Keys
CommandKeyboard ShortcutDescription
Delete RightDeleteDeletes character to the right of the cursor
Delete LeftBackspace Shift + BackspaceDeletes character to the left of the cursor
Delete Word LeftControl + BackspaceDeletes the word to the left of the cursor
Delete Word RightControl + DeleteDeletes the word to the right of the cursor
New LineReturn Shift + ReturnInserts a new line after cursor
New Line AboveControl + ReturnInserts a new line above the line that contains the cursor
New Line BelowControl + Shift + ReturnInserts a new line below the line that contains the cursor
UndoControl + Z Alt + BackspaceUndoes the last command
RedoControl + Shift + Z Alt + Shift + BackspaceRedo the last command
Toggle Insert ModeInsertToggles Insert or Overwrite mode
CopyControl + C Control + InsertCopies the current selection to the clipboard
CutControl + X Shift + DeleteCuts the current selection to the clipboard
PasteControl + V Shift + InsertPastes the clipboard at the cursor or replacing the current selection
Cut LineControl + LCuts the current line to the clipboard
Delete LineControl + Shift + LDeletes the current line
Movement Keys

These keys move the cursor within the document.

Table 2. Movement Keys
CommandKeyboard ShortcutDescription
Move Line UpUp ArrowMoves cursor to the previous line
Move Line DownDown ArrowMoves cursor to the next line
Move LeftLeft ArrowMoves cursor left one character
Move Right Right ArrowMoves cursor right one character
Move Left WordControl + Left ArrowMoves cursor to the beginning of current word
Move Right WordControl + Right ArrowMoves cursor to the beginning of next word
Move Page UpPage UpMoves cursor up one page
Move Page DownPage DownMoves cursor down one page
Move to Screen TopControl + Page UpMoves cursor top of the window
Move to Screen BottomControl + Page DownMoves cursor to bottom of the window
Move to Beginning of DocumentControl + HomeMoves cursor to the beginning of the document
Move to End of DocumentControl + EndMoves cursor to the end of the document
Move to Beginning of LineHomeMoves cursor to the beginning of the line
Move to End of LineEndMoves cursor to the end of the line
Scroll Line UpControl + Up ArrowScrolls up one line
Scroll Line DownControl + Down ArrowScrolls down one line
Move to Matching OpenControl + [Moves to matching open delimiter if cursor is placed before closing delimeter
Move to Matching CloseControl + ]Moves to matching closing delimiter if cursor is placed before opening delimeter
Select to Matching OpenControl + Shift + [Extends selection to matching open delimiter if cursor is placed before closing delimeter
Select to Matching CloseControl + Shift + ]Extends selection to matching closing delimiter if cursor is placed before opening delimeter
Selection Keys

These keys let you select ranges of text.

Table 3. Selection Keys
CommandKeyboard ShortcutDescription
Select AllControl + ASelects the entire document
Select Line UpShift + Up ArrowExtends selection to the line above the cursor
Select Line DownShift + Down ArrowExtends selection to the line below the cursor
Select Character LeftShift + Left ArrowExtends selection to the character to the left of the cursor
Select Character RightShift + Right ArrowExtends selection to the character to the right of the cursor
Select Word LeftControl + Shift + Left ArrowExtends selection to the beginning of the word to the left of the cursor
Select Word RightControl + Shift + Right ArrowExtends selection to the beginning of the word to the right of the cursor
Select WordControl + WSelects the word that the cursor is in
Select Page UpShift + Page UpExtends selection up one page
Select Page DownShift + Page DownExtends selection down one page
Select to Beginning of LineShift + HomeExtends selection to the beginning of the line
Select to End of LineShift + EndExtends selection to the end of the line
Select to Beginning of DocumentControl + Shift + HomeExtends selection to the beginning of the document
Select to End of DocumentControl + Shift + EndExtends selection to the end of the document
Select to Beginning of WindowControl + Shift + Page UpExtends selection to the beginning of the window
Select to End of WindowControl Shift + Page DownExtends selection to the end of the window
Select to Matching OpenControl + Shift + [Extends selection to matching open delimiter if cursor is placed before closing delimeter
Select to Matching CloseControl + Shift + ]Extends selection to matching closing delimiter if cursor is placed before opening delimeter
Block Selection Keys

These keys let you select rectangular regions of text.

Table 4. Block Selection Keys
CommandKeyboard ShortcutDescription
Block Select Line UpAlt + Shift + Up ArrowExtends block selection to the line above the cursor
Block Select Line DownAlt + Shift + Down ArrowExtends block selection to the line below the cursor
Block Select Character LeftAlt + Shift + Left ArrowExtends block selection to the character to the left of the cursor
Block Select Character RightAlt + Shift + Right ArrowExtends block selection to the character to the right of the cursor
Block Select Word LeftAlt + Control + Shift + Left ArrowExtends block selection to the beginning of the word to the left of the cursor
Block Select Word RightAlt + Control + Shift + Right ArrowExtends block selection to the beginning of the word to the right of the cursor
Block Select Page UpAlt + Shift + Page UpExtends block selection up one page
Block Select Page DownAlt + Shift + Page DownExtends block selection down one page
Block Select to Beginning of LineAlt + Shift + HomeExtends block selection to the beginning of the line
Block Select to End of LineAlt + Shift + EndExtends block selection to the end of the line
Block lSelect to Beginning of DocumentAlt + Control + Shift + HomeExtends block selection to the beginning of the document
Block Select to End of DocumentAlt + Control + Shift + EndExtends block selection to the end of the document
Block Select to Beginning of WindowAlt + Control + Shift + Page UpExtends block selection to the beginning of the window
Block Select to End of WindowAlt + Control + Shift + Page DownExtends block selection to the end of the window
Transformation Keys

These keys transform the text around the current cursor or within the currently selected text.

Table 5. Transformation Keys
CommandKeyboard ShortcutDescription
Changes Spaces to TabsControl + QChanges spaces to tabs in selected text
Changes Tabs to SpacesControl + Shift + QChanges tabs to spaces in selected text
Make LowercaseControl + UChanges the selection (or the character to the right of the cursor) to lower case
Make UppercaseControl + Shift + UChanges the selection (or the character to the right of the cursor) to UPPER case
CapitalizeControl + Shift + CChanges the selection so that only the initial character is Uppercase
Transpose CharacterControl + TTransposes the characters on either side of the cursor
Transpose WordControl + Shift + TTransposes the two words to the right of the cursor
Transpose LineAlt + Shift + TTransposes the two lines on either side of the cursor
Remove WhitespaceControl + K Control + \Removes all tabs and spaces in the selection
Comment SelectionControl + K Control + CComments each line in the selection
Uncomment SelectionControl + K Control + UUncomments each line in the selection
Outlining Keys

These let you control the level of outlining in the Script editor.

Table 6. Outlining Keys
CommandKeyboard ShortcutDescription
Toggle OutliningControl + M Control + LCollapse or expand all outlining
Toggle Outlining of RegionControl + M Control + MCollapse or expand outlining in the region that contains the cursor
Collapse to DefinitionsControl + M Control + OCollapse outlining so that only definitions are visible
Searching Keys

These keys let you search for strings in the text.

Table 7. Searching Keys
CommandKeyboard ShortcutDescription
FindControl + FOpens Find dialog
Find NextF3Find next instance of search string
Find NextShift + F3Find previous instance of search string
Find Next SelectedControl + F3Find next instance of the selected text
Find Previous SelectedControl + Shift + F3Find previous instance of the selected text
ReplaceControl + HOpens Find and Replace dialog
Go to LineControl + GOpens Go to Line dialog
Incremental SearchControl + IStarts incremental search (Escape cancels)
Reverse Incremental SearchControl + Shift + IStarts reverse incremental search (Escape cancels)
Set Search OptionsAlt + F3 H: Search Hidden Text

Alt + F3 C: Match Case

Alt + F3 R: Use Regular Expressions

Alt + F3 B: Search Up

Alt + F3 W: Match Whole Word
Sets search options as in the Find dialog