Qse: Quikscript Editor

Short­cuts in Qse

A short­cut is a keystroke that allows one or more internal procedures of Qse to be called. They are only acted upon when typed into an editor window. They act like hot­keys.

Identifying key­names

The panel to create or modify short­cuts contains a text­field at the top that is useful to determine the name of a key on the keyboard. Pointing to the field and typing a key will show its name within that field. In the field below, the current short­cut associated with that key will be shown, or just the key­name followed by an '='.

Short­cut procedures

The procedures that are available can be selected by clicking on "Select:". Many of these use or modify the current insertion point that is marked in the text document by a small "caret" or inverted V. The procedures have the following behaviour:

line_start() Move the insertion point to the start of the current line.
line_end() Move the insertion point to the end of the current line.
next_line() Move the insertion point to the next line.
previous_line() Move the insertion point to the previous line.
left_char() Move the insertion point leftwards on the current line by one character position.
right_char() Move the insertion point rightwards on the current line by one character position.
file_end() Move the insertion point to the end of the document.
file_start() Move the insertion point to the start of the document.
delete_to_eol() Delete the characters on the current line that follow the current insertion point.
delete_to_sol() Delete the characters on the current line that precede the current insertion point.
delete_next() Delete the next character that follows the current insertion point.
delete_previous() Delete the character that precedes the current insertion point.
select_all() Select the entire contents of the document.
select_start() Mark the current insertion point as the start of a new selection.
select_extend() Extend the selected section of the document from the previously selected point or section to the current insertion point.
search_forward() Search forwards for the next occurrence in the document of the currently selected text.
search_backward() Search backwards for the previous occurrence in the document of the currently selected text.
insert("###") The parameter will be inserted at the current insertion point. The "#" text will need to be replaced with something more useful to you. It must be included in double quotes.
bounds_insert("###","###") Insert the first text parameter at the commencement of the current selection, and a second text parameter at the end of the selection. The "#" text will have to be edited to what you want. This is useful for putting pairs of layout marks around a block of text, such as "%BD%" and "%LT%" or "%IT%" and "%RO%".
align() If there is no current selection, this will align the current line with the previous.
If there is a current text selection, this will cause all lines within the selection to be aligned with the line containing the start of the selection.
shift_left() Shift the currently selected line or lines left by one character, discarding a blank character from the front of the lines.
shift_right() Shift the currently selected line or lines right by one character, adding a blank character to the front of the lines.
upper_case() Convert the selected text to upper-case.
lower_case() Convert the selected text to lower-case.
undo() Undo the most recent change to the document.
redo() Redo the most recently undone change to the document.
newFile() This will perform the same as selecting "New" from the "File" menu. If the current window contents have been modified, a new window will be created. Otherwise, the contents of the current window are cleared.
openFile() This will perform the same as selecting "Open" from the "File" menu. It will put the file­selection pop­up panel on the screen.
saveFile() This will perform the same as selecting "Save" from the "File" menu. It will put the file­selection pop­up panel on the screen, allowing you to confirm or modify the filename.
closeWindow() This will perform the same as selecting "Close" from the "File" menu. If the window contents have been changed, it will prompt you to verify that you wish to discard the current window.
clearWindow() This will perform the same as selecting "Clear" from the "File" menu. It will discard the contents of the current window.
expandToWindow() This will put the pop­up panel on the screen that is obtained by selecting "File", "Expand", "To window" from the menus.

Apply, Save, Reload, Finished

At the bottom of the panel, there are four buttons.
Apply
Will cause the text in the "Short­cut" text­field to be interpreted and held within the currently running Qse window.
Save & Apply
Will cause the text in the "Short­cut" text­field to be written to the end of the .Qsc file so that it will be automatically loaded when Qse is next started. It will also interpret the text and allow the new short­cut to be active in the current session of Qse.
Reload
Will cause all shortcuts in the current Qse window to be discarded and the .Qsc file to be reread. This can be used to remove a short­cut which has been created and is no longer wanted. It is also useful if there are several Qse windows, and a short­cut created in one window is wanted in another window.
Finished
Will remove the "Short­cuts" panel from the screen.

Note on keystroke selection

Short­cut keystrokes are recognized when the key is pressed rather than when it is released, in contrast to normal keystrokes. A consequence of this is that any key that will generate an ASCII or ISO character, such as 'Enter' or Ctrl-A, can be set up as a short­cut key, but it will be acted upon both as a short­cut and as an ordinary key, with the new­line character or control character inserted into the editing area after the short­cut has been performed. For this reason, it usually makes more sense to set up as short­cuts the special keys, such as function keys, "Home", "End", or "Print Screen", possibly with Shift­, Ctrl­ or Alt­ modifiers, which have no effect normally on the text­area.