Added keystroke methods

These are the editor methods added by the DevTools. Unless otherwise noted, they can be assigned to keystrokes using the TextEditor Keystroke remapping.

backspaceNoCutKey: aCharEvent

This method backspaces over the last character but it does not perform a cut like backspaceKey: does.

basicPasteKey: aCharEvent

This method pastes the text from the shared buffer over the current selection. Unlike pasteKey: this does not check to see if the Shift key is depressed. This makes it possible to assign it to key combinations like "SHIFT+INSERT".

browseAllInstances: aCharEvent

This method parses and evaluates the current text selection. The class of the evaluation result is queried for all its instances. If only one instance exists, an inspector is opened on that instance. If there are multiple instances, an inspector is opened on the collection of the instances. This functions is also available from the inspect all instances menu item of the Class Hierarchy Browser.

browseClassHierarchyKey: aCharEvent

This method parses and evaluates the current text selection. A Class Hierarchy browser is opened on the class of the evaluation result. This functions is also available from the hierarchy menu item of the browse menu in the enhanced TextEditor pop-up menu.

browseClassKey: aCharEvent

This method parses and evaluates the current text selection. A Class browser is opened on the class of the evaluation result. This functions is also available from the class menu item of the browse menu in the enhanced TextEditor pop-up menu.

closeWindowKey: aCharEvent

This method sends closeRequest to the model of the current window. If there are changes in the content of the window, a dialog pops up to confirm if the window should be closed. This acts the same as if the user used the mouse to request a window close from the Window menu.

copyCurrentKey: aCharEvent

Like copyKey:, if any text is currently selected, then that text is copied to the clipboard. However, if the selection is empty, then the current word near the position of the cursor is selected and copied to the clipboard.

cursorToStartOfNextLineKey: aCharEvent

This method moves the cursor to the beginning of the next line of text. This method is written to handle word wrap, so the cursor may actually move down the screen more then one line.

cursorToStartOfNextWordKey: aCharEvent

This method moves the cursor to the beginning of the next word of text. If any text is currently selected, then that text is deselected, and the cursor moves to the beginning of what was the previous selection. For more information on the tokens used to determine stopping places, see documentation for nextTokenStart: or previousTokenStart:.

cursorToStartOfWordKey: aCharEvent

This method moves the cursor to the beginning of the current word, or to the beginning of the previous word if the cursor is already at the start of a word. If any text is currently selected, then that text is deselected, and the cursor moves to the beginning of what was the previous selection. For more information on the tokens used to determine stopping places, see documentation for nextTokenStart: or previousTokenStart:.

cutCurrentKey: aCharEvent

Like cutKey:, if there any text is currently selected, then that text is cut to the clipboard. However, if no text is selected, then the current word near the position of the cursor is selected and cut to the clipboard. For more information on the tokens used to determine stopping places, see documentation for nextTokenStart: or previousTokenStart:

debugItKey: aCharEvent

If any text is currently selected, the selection is copied to a buffer and a line with "self halt." is put in the buffer before the text. The text in the buffer is then treated as if the do it menu item is chosen from the enhanced Text editor pop-up menu. A "halt" debugger window pops up and the user can use it in the normal manner. The selection in the original window is not modified in any way.

deleteNoCutKey: aCharEvent

If "LookPreferences deleteForward" is set to false, then backspaceKey: is called. If "LookPreferences deleteForward" is set to true, then like deleteKey:, if any text is currently selected, that text is removed. If no text is currently selected, then the character to the right of the caret is removed. Unlike deleteKey: the removed text is not copied to the clipboard.

displayAndBracketEncloseKey: aCharEvent

If any text is currently selected, then it is replaced with 'and: [ (original text selection included here) ]' and the cursor is placed at the end of the enclosed text. If nothing is currently selected, then 'and: [  ]' is inserted into the text, and the cursor is placed in the middle of the bracketed space.

displayAndBracketKey: aCharEvent

This method replaces the current selection with the text 'and: ['.

displayIfFalseBracketEncloseKey: aCharEvent

If any text is currently selected, then it is replaced with 'ifFalse: [ (original text selection included here) ]' and the cursor is placed at the end of the enclosed text. If nothing is currently selected, then 'ifFalse: [  ]' is inserted into the text, and the cursor is placed in the middle of the bracketed space.

displayIfFalseBracketKey: aCharEvent

This method replaces the current selection with the text 'ifFalse: ['.

displayIfTrueBracketEncloseKey: aCharEvent

If any text is currently selected, then it is replaced with 'ifTrue: [ (original text selection included here) ]' and the cursor is placed at the end of the enclosed text. If nothing is currently selected, then 'ifTrue: [  ]' is inserted into the text, and the cursor is placed in the middle of the bracketed space.

displayIfTrueBracketKey: aCharEvent

This method replaces the current selection with the text 'ifTrue: ['.

displayOrBracketEncloseKey: aCharEvent

If any text is currently selected, then it is replaced with 'or: [ (original text selection included here) ]' and the cursor is placed at the end of the enclosed text. If nothing is selected, then 'or: [  ]' is inserted into the text, and the cursor is placed in the middle of the bracketed space.

displayOrBracketKey: aCharEvent

This method replaces the current selection with the text 'or: ['.

doMenu: aCharEvent

This method pops-up the Text editor pop-up menu as if the user had pressed the menu button on the mouse.

doMethod: aCharEvent

Image of the chooser dialog window that appears when the doMethod: is executed.This method opens up a list chooser with a list of all the editing protocol methods that can be assigned to keystrokes. With this the user can execute a text editing method that is not currently mapped to any keystroke or execute one for which the assigned keystroke cannot be remembered.

formatAcceptKey: aCharEvent

If the text model for the editor controller understands a format:from: message, then that message is sent to the model and the model is asked to accept the changes. In most Paragraph editors, this executes the same methods that are executed if the format and then then the accept menu items are chosen from the Text editor pop-up menu.

formatKey: aCharEvent

If the text model for the editor controller understands a format:from: message, then that message is sent to the model. In most Paragraph editors, this executes the same methods that are executed if the format menu item is chosen from the Text editor pop-up menu.

insertBreakpointKey: aCharEvent

If the text model understands a addBreakpoint:from: message, then that message is sent to the model. In most Paragraph editors, this executes the same method that is executed if insert breakpoint menu item is chosen from on the enhanced Text editor pop-up menu. As a warning, this method is tied to the PDP Debugger (Professional Debug Package) and is an experimental use of it. Calling this method sometimes causes the text in the code view editing pane to be displayed incorrectly. This method should be used with caution.

mapKeystrokesKey: aCharEvent

This method opens a DispatchTable editor for the Editor controller of the current window pane and will allow the keystrokes to be remapped for all Editor controllers like the current one.. This functions is also available from the map keystrokes... menu item on the enhanced TextEditor pop-up menu.

moveSelectionLeftKey: aCharEvent

If any text is currently selected, then the first separator character on each line is removed. If the beginning of the line is not a separator character, then the line is not changed. This method is designed to work with word-wrapped lines so the number of lines changed may be less than the number of screen lines displayed in the selection.

moveSelectionRightKey: aCharEvent

If any text is currently selected, then a tab character is added to the beginning of each selected line. This method is designed to work with word-wrapped lines so the number of lines changed may be less than the number of screen lines displayed in the selection.

pasteAcceptKey: aCharEvent

If any text is currently selected, then the contents of the clipboard are pasted over the selection. If nothing is currently selected, then the contents of the clipboard are inserted into the text. After the paste or insert, the text is accepted. In most Paragraph editors, this executes the same methods that are executed if the paste and then the accept menu items are chosen from on the Text editor pop-up menu.

pasteCurrentKey: aCharEvent

If any text is currently selected, then the contents of the clipboard are pasted over the selection. If nothing is currently selected, then any word that the cursor is in, or directly next to, is selected and the contents of the clipboard are pasted over that text.

pasteFormatAcceptKey: aCharEvent

This method pastes the text in the clipboard and then asks the model to format its text and accept the changes. In most Paragraph editors, this executes the same methods that are executed if the paste, and then the format, and then the accept menu items are chosen from the Text editor pop-up menu.

pasteFormatKey: aCharEvent

This method pastes the text in the clipboard and then asks the model to format its text. In most Paragraph editors, this executes the same methods that are executed if the paste and then format menu items are chosen from the Text editor pop-up menu.

pasteLongDate: aCharEvent

This method replaces the current text selection with the long version of the current day and date. This is in the form of: 'DayOfWeek, Month dayOfMonth, Year'. i.e. Friday, June 27, 2003.

pasteMethodTemplateKey: aCharEvent

This method sends code editing models a pasteMethodTemplate message. A chooser window dialog pops up with the hierarchy of the current class listed on the left side. On the right side is a list of the instance or class methods for the selected class. If the user selects a class and method name combination and then presses the accept button, a method call template will be pasted into the text. In most Paragraph editors, this executes the same method that is executed if  the paste special | method call... menu item item is chosen from the enhanced Text editor pop-up menu.

pasteModificationDate: aCharEvent

This method replaces the current text selection with the current Envy users name and long version of the current day and date. This is in the form of: 'Name. DayOfWeek, Month dayOfMonth, Year'. i.e. James T. Savidge, Friday, June 27, 2003.

pastePrevious: aCharEvent

This method provides a way to call an existing, but not well-publicized, feature in VisualWorks. When this method is called, a dialog pops up displaying the list of items in the paste history buffer. If one of the items is chosen, and the OK button is pressed, the item is pasted into the text. This function is also available if the Shift key is held when the paste menu item is chosen from the Text editor pop-up menu, or if the paste special | previous... menu item is chosen from the enhanced Text editor pop-up menu.

pasteUserName: aCharEvent

This method replaces the current text selection with the current Envy user’s name.

scrollViewDownKey: aCharEvent

While maintaining the position of the cursor in the text, the view of the text scrolls down one line. This acts the same as the the mouse clicking on the "up scroll arrow" one time.

scrollViewUpKey: aCharEvent

While maintaining the position of the cursor in the text, the view of the text scrolls up one line. This acts the same as the mouse to clicking on the "down scroll arrow" one time.

selectIfNecessaryAndBrowseAllInstances: aCharEvent

If no text is currently selected, this variation of browseAllInstances: will select to the beginning of the line before browsing all instances of the evaluated selection.

selectIfNecessaryAndBrowseClassHierarchyKey: aCharEvent

If no text is currently selected, this variation of browseClassHierarchyKey: will select to the beginning of the line before browsing the class hierarchy of the evaluated selection.

selectIfNecessaryAndBrowseClassKey: aCharEvent

If no text is currently selected, this variation of browseClassKey: will select to the beginning of the line before browsing the class of the evaluated selection.

selectIfNecessaryAndDebugItKey: aCharEvent

If no text is currently selected, this variation of debugItKey: will select to the beginning of the line before bringing up a halt window on the execution of the evaluated selection.

selectIfNecessaryAndDoItKey: aCharEvent

If no text is currently selected, this variation of doItKey: will select to the beginning of the line before evaluating the selection.

selectIfNecessaryAndInspectItKey: aCharEvent

If no text is currently selected, this variation of inspectItKey: will select to the beginning of the line before inspecting the results of the evaluated selection.

selectIfNecessaryAndPrintItKey: aCharEvent

If no text is currently selected, this variation of printItKey: will select to the beginning of the line and then print the results of the evaluated selection.

selectToEndOfLineKey: aCharEvent

This method extends the current text selection to the end of the current line of text.

selectToNextCharacterKey: aCharEvent

This method extends the current text selection one character the right.

selectToNextLineKey: aCharEvent

This method extends the current text selection one line down on the screen.

selectToNextPageKey: aCharEvent

This method extends the current text selection down one page on the screen and also scrolls the view down one page.

selectToPreviousCharacterKey: aCharEvent

This method extends the current text selection one character the left.

selectToPreviousLineKey: aCharEvent

This method extends the current text selection one line up on the screen.

selectToPreviousPageKey: aCharEvent

This method extends the current text selection up one page on the screen and also scrolls the view up one page.

selectToStartOfLineKey: aCharEvent

This method extends the current text selection to the beginning of the current line of text.

selectToStartOfWordKey: aCharEvent

This method extends the current text selection to the beginning of the current word, or to the beginning of the previous word if the cursor is already at the start of a word. For more information on the tokens used to determine stopping places, please see nextTokenStart: or previousTokenStart:.

toggleCaseKey: aCharEvent

This method changes the characters of the current selection to uppercase if they are lowercase and to lowercase if they are uppercase.

withSpacesEncloseKey: aCharEvent

Like encloseKey:, the beginning and end of the current selection are checked to see if the selection is surrounded by any of the following pairs: (),[],<>,{},'' and "". The specific pair searched-for is based on the keyValue of aCharEvent. If a searched-for mating pair is found, those characters are removed from the selection. If the searched for pair is not found, the selection is enclosed with the pair. (i.e. '{frank}' becomes 'frank' and 'bob' can become '<bob>'.) Unlike encloseKey:, this method adds spaces between the original selection and any new enclosing characters. (i.e. '{frank}' becomes ' frank ', but 'bob' can become '< bob >'.)


[ < ControlWORKS added keystroke methods ] [ Added keystroke utility methods > ]

[ Main ] [ Table of Contents ] [ Contact info ] [ Index ]

[ Home ]

This work is licensed under a Creative Commons License.

Creative Commons License